@props([
    'group' => [
        'class' => null,
    ],
    'id' => null,
    'label' => null,
    'type' => 'checkbox',
    'switch' => false,
    'checked' => false,
    'value' => "1",
    'required' => '',
    'hint' => null
])

@php
    $attributes = $attributes
    ->merge([
    ])
    ->class([
        'checkbox__input',
    ]);
@endphp

<x-bs-form.group class="{{ $group['class'] }}">
    <div class="checkbox" {{ $switch ? "data-switch=true" : "" }}>
        <input {{ $required }} {{ $attributes }} {{ empty($id)  ? "" : "id=$id" }} value="{{ $value }}" type="{{ $type }}" @if($checked==$value) checked @endif />
        <x-bs-form.label 
            :label=$label 
            :for="$id" :hint=$hint 
        />
    </div>
</x-bs-form.group>