"use client"; import { Monitor, Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { tr } from "@/i18n/tr"; const OPTIONS = [ { value: "light", label: tr.theme.light, icon: Sun }, { value: "dark", label: tr.theme.dark, icon: Moon }, { value: "system", label: tr.theme.system, icon: Monitor }, ] as const; /** Açık / Koyu / Sistem tema seçici. İkon CSS ile değişir (hydration güvenli). */ export function ThemeToggle() { const { theme, setTheme } = useTheme(); return ( {tr.theme.label} {OPTIONS.map(({ value, label, icon: Icon }) => ( {label} ))} ); }