@php $id = $getId(); $statePath = $getStatePath(); $isDisabled = $isDisabled(); $options = $getOptions(); $offColor = $getOffColor() ?? 'gray'; $onColor = $getOnColor() ?? 'primary'; $gridDirection = $getGridDirection() ?? 'column'; $icons = $getIcons(); $iconPosition = $getIconPosition(); $iconSize = $getIconSize(); @endphp
$gridDirection === 'row', 'sm:grid-flow-col sm:grid-rows-2' => $gridDirection === 'column', ]) x-data="{ state: $wire.{{ $applyStateBindingModifiers("entangle('{$statePath}')") }}, getColor(color) { return color === 'gray' ? 'bg-white text-gray-950 hover:bg-gray-50 dark:bg-white/5 dark:text-white dark:hover:bg-white/10 ring-1 ring-gray-950/10 dark:ring-white/20' : 'bg-custom-600 text-white hover:bg-custom-500 dark:bg-custom-500 dark:hover:bg-custom-400 focus:ring-custom-500/50 dark:focus:ring-custom-400/50'; } }" > @foreach ($options as $value => $label) @php $inputId = "{$id}-{$value}"; $shouldOptionBeDisabled = $isDisabled || $isOptionDisabled($value, $label); @endphp @endforeach