"use client" import { Monitor, Moon, Sun, Globe } from "lucide-react" import { useTheme } from "next-themes" import { useTranslations } from "next-intl" import { LocaleSwitcher } from "@/shared/components/locale-switcher" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" import { Label } from "@/shared/components/ui/label" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/shared/components/ui/select" type ThemeChoice = "system" | "light" | "dark" /** * 外观偏好卡片 * * 包含主题切换(system/light/dark)和语言切换。 * 语言切换复用 shared/components/locale-switcher 组件。 */ export function ThemePreferencesCard(): React.ReactElement { const t = useTranslations("settings.appearance.theme") const tLang = useTranslations("settings.appearance.language") const { theme, setTheme } = useTheme() const value: ThemeChoice = theme === "light" || theme === "dark" || theme === "system" ? theme : "system" return ( {t("title")} {t("description")}

{tLang("description")}

) }