@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