@php
    $livewireModel =  $attributes->get('wire:model', $attributes->get('wire:model.defer'));
    $name = $attributes->get('name', $livewireModel);
    $id = $attributes->get('id', $name);
    $parentClass = $attributes->get('parent_class', 'form-check-secondary'); // Uso de la segunda opción de $attributes->get()
    $checked = isset($checked) && $checked? 'checked' : ''; // Asegurarse de que la variable esté definida y sea booleana
@endphp
<div class="form-check {{ $parentClass }}">
    <input type="checkbox" id="{{ $id }}" name="{{ $name }}" {!! $attributes->except(['id', 'name', 'parent_class'])->merge(['class' => 'form-check-input']) !!} {{ $checked }}>
    <label class="form-check-label" for="{{ $id }}">
        {{ $slot }}
    </label>
</div>
