@props([
'label' => null,
'name' => '',
'feedback' => null,
'options' => [],
'noLabel' => false,
'disabled' => false
])
@php($name = $attributes->whereStartsWith('wire:model')->first() ?? $name)
has('x-select2')) x-data="{
error: @js($errors->first($name)),
hasError: @js($errors->has($name))
}" x-init="$watch('error', (val) => console.log(val))" @endif
class="form-group"
@if ($attributes->has('x-show')) x-show="{{ $attributes->get('x-show') }}" x-cloak @endif
>
@if (! $noLabel)
@endif
@if ($feedback)
@elseif ($errors->has($name))
{{ $errors->first($name) }}
@endif