@props(['label' => null, 'bag' => 'default', 'name' => null, 'type' => 'text', 'hint' => null, 'id' => null]) @php $name ??= $attributes->wire('model')->value(); $id ??= 'f-'.str_replace(['.', '[', ']'], '-', (string) $name); $error = $name ? $errors->getBag($bag)->first($name) : null; @endphp
@if ($label)@endif class(['input', 'is-error' => $error]) }} @if ($error) aria-invalid="true" aria-describedby="{{ $id }}-err" @endif> @if ($error) {{ $error }} @elseif ($hint) {{ $hint }} @endif