@props([ 'uid' => uniqid(), 'id' => '', 'model' => '', 'name' => '', 'type' => 'checkbox', // checkbox o radio 'title' => '', 'description' => '', 'icon' => null, // Clases de iconos (ej: ti ti-rocket) 'image' => null, // URL de imagen 'checked' => false, 'disabled' => false, 'helperText' => '', // Texto de ayuda opcional ]) @php $livewireModel = $attributes->get('wire:model', $model); $name = $name ?: $livewireModel; $inputId = $id ?: ($uid ? $name . '_' . $uid : $name); $errorClass = $errors->has($model) ? 'is-invalid' : ''; $checkedAttribute = $checked ? 'checked' : ''; $visualContent = $icon ? "" : ($image ? "{$title}" : ''); @endphp
@if ($helperText)
{{ $helperText }}
@endif @error($model) {{ $message }} @enderror