"use client"; import { KeyRound, PlugZap, Route, type LucideIcon } from "lucide-react"; import type { ReactNode } from "react"; import { cardClass } from "@/lib/ui/variants"; export type SettingsSection = "routing" | "oauth" | "keys"; // 分组的单一标签源:桌面 aside 与移动 SegmentedControl 共用,消除「档位路由 / 路由」漂移。 export const SETTINGS_SECTIONS: Array<{ value: SettingsSection; label: string; icon: LucideIcon; }> = [ { value: "routing", label: "档位路由", icon: Route }, { value: "oauth", label: "OAuth", icon: PlugZap }, { value: "keys", label: "API Key", icon: KeyRound }, ]; export const SECTION_OPTIONS = SETTINGS_SECTIONS.map(({ value, label }) => ({ value, label, })); interface SettingsNavProps { activeSection: SettingsSection; onSelect: (value: SettingsSection) => void; detailFor: (value: SettingsSection) => string; } // 桌面侧栏:设置分组导航(移动端由 SegmentedControl 承担)。 export function SettingsNav({ activeSection, onSelect, detailFor, }: SettingsNavProps) { return ( ); } interface SettingsNavButtonProps { active: boolean; icon: ReactNode; label: string; detail: string; onClick: () => void; } function SettingsNavButton({ active, icon, label, detail, onClick, }: SettingsNavButtonProps) { return ( ); }