"use client"; import { Moon, Sun } from "lucide-react"; import { Button } from "@/components/ui/button"; import { THEME_COOKIE } from "@/lib/theme"; /** Dark ⇄ light; the choice lives in a cookie for a year (the root layout reads it). */ export function ThemeToggle() { const toggle = () => { const dark = document.documentElement.classList.toggle("dark"); document.cookie = `${THEME_COOKIE}=${dark ? "dark" : "light"}; path=/; max-age=31536000; samesite=lax`; }; return ( ); }