{{-- Premium Multi-Select Component Custom Alpine.js multi-select with search/filter functionality. No external dependencies - full design control. --}} @props([ 'id' => null, 'name' => null, 'label' => null, 'help' => null, 'placeholder' => trans('common.select_options'), 'searchPlaceholder' => trans('common.search') . '...', 'options' => [], 'value' => [], 'required' => false, 'class' => '', 'text' => null, ]) @php $id = $id ?? 'multiselect_' . uniqid(); $selectedValues = is_array($value) ? $value : (is_string($value) ? explode(',', $value) : []); @endphp
{{-- Label --}} @if ($label)
@if ($help) {!! $help !!} @endif
@endif {{-- Multi-Select Component --}}
{{-- Hidden inputs for form submission --}} {{-- Trigger Area --}}
{{-- Selected Tags --}}
{{-- Placeholder when empty --}} {{ $placeholder }} {{-- Selected item tags --}}
{{-- Dropdown Icon --}}
{{-- Dropdown Panel --}}
{{-- Error / Help Text --}}
@error($name)

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

@else @if ($text)

{!! $text !!}

@endif @enderror