<div class="custom-control custom-switch">
    <input type="checkbox" class="custom-control-input" id="{{$switchId ?? ''}}" wire:change.prevent="changeState('{{$switchId}}')" @if($state) checked="checked" @endif>
    <label class="custom-control-label" for="{{$switchId ?? ''}}"></label>
</div>