@php $inputProperty = $attributes->wire('model-text'); $resultsProperty = $attributes->wire('model-results'); $selectedProperty = $attributes->wire('model-id'); $focusAction = $attributes->wire('focus'); /** Remove all wire attributes that are assigned to local properties from the attribute bag */ $attributes = $attributes->whereDoesntStartWith('wire:'); $inputValue = $this->getPropertyValue($inputProperty->value); $resultsValue = $this->getPropertyValue($resultsProperty->value); $autoSelect = filter_var($getOption('auto-select'), FILTER_VALIDATE_BOOLEAN); $allowNew = filter_var($getOption('allow-new'), FILTER_VALIDATE_BOOLEAN); $loadOnceOnFocus = filter_var($getOption('load-once-on-focus'), FILTER_VALIDATE_BOOLEAN); $inline = filter_var($getOption('inline'), FILTER_VALIDATE_BOOLEAN); @endphp @if ($shouldShowPlaceholder($resultsValue, $inputValue)) @else @if ($hasResults($resultsValue) || $allowNew) @if ($allowNew && strlen($inputValue) > 0) @endif @if ($resultsValue) @foreach ($resultsValue as $key => $result) @endforeach @endif @else @endif @endif @once @endonce