{{define "language_dropdown"}}
<div class="relative flex items-center gap-2 text-sm">
  <img id="lang-flag" class="rounded object-cover dark:outline" src="/static/vendor/flags/it.svg" alt="Italiano" style="width:32px;height:22px;">
  <select id="lang-select" name="lang" class="inline-flex h-8 min-w-[95px] items-center rounded-lg bg-white px-3 py-1 text-sm font-medium text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700 dark:focus:ring-gray-700" {{if .CurrentUser}}hx-post="/preferences/lang" hx-trigger="change" hx-swap="none"{{end}}>
    <option value="it">Italiano</option>
    <option value="en">English</option>
    <option value="en_us">English USA</option>
    <option value="de">Deutsch</option>
    <option value="de_ch">Deutsch CH</option>
    <option value="fr">Français</option>
    <option value="fr_ch">Français CH</option>
  </select>
</div>
{{end}}
