"use client"; import { useRouter } from "next/navigation"; import { Globe } from "lucide-react"; import type { Locale } from "./locale-toggle"; export function LocaleToggleClient({ current, variant = "retro", }: { current: Locale; variant?: "retro" | "navbar" }) { const router = useRouter(); function setLocale(next: Locale) { if (next === current) return; document.cookie = `locale=${next}; path=/; max-age=${60 * 60 * 24 * 365}; SameSite=Lax`; router.refresh(); } if (variant === "navbar") { // Gold-amber magazine theme to match SiteHeader / BureauNav. return (
); } return (
); }