'use client'; import { persistLocale } from '@/lib/localization/client'; import { localeSwitchUrl, locales, routeIdFromPathname, type Locale, } from '@/lib/localization/config'; import { usePathname } from 'next/navigation'; import styles from './Controls.module.css'; interface LocaleSelectorProps { currentLocale: Locale; label: string; localeNames: Record; compact?: boolean; } export function LocaleSelector({ currentLocale, label, localeNames, compact = false, }: LocaleSelectorProps) { const pathname = usePathname(); const routeId = routeIdFromPathname(pathname) ?? 'home'; return ( ); }