{{-- Premium Select Component Modern select with optional searchable dropdown matching multiselect design. When searchable=true, displays a premium Alpine.js dropdown with search. When searchable=false, displays a clean native select. --}}
{{-- Label Row --}} @if ($label || ($rightText && $rightPosition == 'top'))
@if ($label) @if ($help) {!! $help !!} @endif @endif
@if ($rightText && $rightPosition == 'top') @endif
@endif @if ($searchable && !$multiselect) {{-- Searchable Select Component --}} @php $optionsForJs = collect($options)->map(fn($text, $val) => ['value' => (string)$val, 'text' => $text])->values(); @endphp
{{-- Hidden input for form submission --}} {{-- Trigger Area --}}
{{-- Selected Value Display --}}
@if ($icon) @endif
{{-- Dropdown Icon --}}
{{-- Dropdown Panel --}}
@else {{-- Native Select Input --}}
@if ($icon)
@endif {{-- Dropdown arrow --}} @if (!$multiselect)
@endif
@endif {{-- Error / Help Text --}}
@error($name)

{{ $errors->first($name) }}

@else @if ($text)

{!! $text !!}

@endif @enderror @if ($rightText && $rightPosition == 'bottom') @endif