{{-- Switches the colour theme through `$store.theme` (resources/js/theme.js), so every toggle on a page reads and writes the one choice and none needs an id. `mode`: - `toggle` (the default): an icon button between light and dark. The icon is where it takes you — a sun while the page is dark, a moon while it is light — and it is a toggle button, "Dark theme", pressed while dark. - `cycle`: an icon button that steps light → dark → system, showing the choice it is on. - `picker`: M3's segmented buttons for the three choices, for a settings page. - `contrast`: the same row for M3's three contrast levels — standard, medium (3:1) and high (7:1), the three the scheme is generated in. The row marks the level in force (`resolvedContrast`), so the operating system's setting shows while the choice is `system`, and choosing one is an explicit choice from then on. The theme is the visitor's, known only in the browser, so the parts that depend on it wait for Alpine (`x-cloak`) rather than render a guess. `class` lands on the button or the group. --}} @props([ 'mode' => 'toggle', ]) @php $mode = in_array($mode, ['toggle', 'cycle', 'picker', 'contrast'], true) ? $mode : 'toggle'; @endphp @if ($mode === 'contrast')