@props([ 'label' => null, 'help' => null, 'model' => null, 'lazy' => false, 'direction' => '', 'rowWidth' => 9, 'optionLabel' => ' ', 'customSwitchClass' => '', 'formGroupClass' => null, 'size' => null, ]) @php if ($lazy) $bind = 'lazy'; else $bind = 'defer'; $wireModel = $attributes->whereStartsWith('wire:model')->first(); $key = $attributes->get('name', $model ?? $wireModel); $id = uniqid(); $prefix = null; $attributes = $attributes->class([ 'custom-control-input', 'is-invalid' => $errors->has($key), ])->merge([ 'type' => 'checkbox', 'name' => $key, 'wire:model.' . $bind => $model ? $prefix . $model : null, ]); @endphp
$size, $customSwitchClass, ]) > merge(['id' => $id]) }}>