"use client"; import { Moon, Sun } from "lucide-react"; import { useTranslations } from "next-intl"; import { useTheme } from "next-themes"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; /** * Flips between the light and dark theme. The icon is picked by the `dark` * class on , not by React state, so the server render already matches. */ export function ThemeToggle({ className, tooltipSide = "top" }: { className?: string; tooltipSide?: "top" | "right" | "bottom" | "left" }) { const t = useTranslations("shell"); const { resolvedTheme, setTheme } = useTheme(); const label = t("theme.toggle"); return ( {label} ); }