{# Settings dropdown (language + theme). Shared by base.html and admin/base.html to kill the former ~100-line copy-paste duplication. Adapted from the vendored Penguin UI component penguinui-components/dropdowns/dropdown-with-click.html: Penguin's dropdown menu container + item treatment. Deviations: kept our gear icon-only trigger and our core-Alpine open / @click.outside toggle (upstream's x-trap / $focus need the Alpine Focus plugin, which we don't bundle); item hover uses bg-primary/5 to stay consistent with the rest of our Penguin-ified UI. The host template provides the wrapper
{{ t(key="settings-theme", lang=lang | default(value='sk')) }}
{# Theme picker: Penguin UI's switch toggle (penguinui-components/toggle/default-toggle.html), adapted from a standalone checkbox into a light/dark switch wired to our existing setTheme()/currentTheme() helpers in base.html (which drive ). The `dark` state initialises from the resolved theme — so a stored 'system' preference still reflects the current appearance — and stays in sync via the theme:changed event the helpers dispatch. Toggling writes an explicit light/dark choice (the old tri-state 'system' option is dropped, matching Penguin's binary toggle). #}