import { DEFAULT_LOCALE, localizedStrings, SUPPORTED_LOCALE_FLAGS, SUPPORTED_LOCALES, } from '@blitzkit/core'; import { Select } from '@radix-ui/themes'; import type { LocaleAcceptorProps } from '../hooks/useLocale'; export function LocaleSwitcher({ locale }: LocaleAcceptorProps) { return ( { localStorage.setItem('preferred-locale', locale); window.location.pathname = `/${locale === DEFAULT_LOCALE ? '' : locale}`; }} > {SUPPORTED_LOCALES.map((locale) => ( {SUPPORTED_LOCALE_FLAGS[locale]}{' '} {localizedStrings[locale].common.locales[locale]} ))} ); }