'use client'; import { Languages } from 'lucide-react'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import type { AppLocale } from '@/lib/i18n/core'; import { pickAppText } from '@/lib/i18n/core'; import { useAppI18n } from '@/lib/i18n/provider'; import { cn } from '@/lib/utils'; const OPTIONS = [ { value: 'zh-CN', label: '中文', shortLabel: '中' }, { value: 'en-US', label: 'English', shortLabel: 'EN' }, { value: 'zh-Hant', label: '繁體中文', shortLabel: '繁' }, ] as const; export function LanguageSwitcher({ className }: { className?: string }) { const { locale, setLocale } = useAppI18n(); const selectedOption = OPTIONS.find((option) => option.value === locale) ?? OPTIONS[0]; return ( ); }