/* ============================================================ IO PAGE — Input / Output Selection Design: Reference luxsin_x8_输入输出.jpg - Circular icon buttons in a grid (3 cols) - Active = cyan fill + glow - Inactive = dark gray circle ============================================================ */ import { useDevice } from "@/contexts/DeviceContext"; import { cn } from "@/lib/utils"; import { ChevronLeft } from "lucide-react"; import { useLocation } from "wouter"; interface IOOption { index: number; label: string; icon: React.ReactNode; } const InputIcon = ({ d }: { d: string }) => ( ); const INPUT_OPTIONS: IOOption[] = [ { index: 0, label: "USB-B", icon: }, { index: 1, label: "USB-C", icon: }, { index: 2, label: "同轴", icon: }, { index: 3, label: "光纤", icon: }, { index: 4, label: "蓝牙", icon: }, { index: 5, label: "IIS", icon: }, ]; const OUTPUT_OPTIONS: IOOption[] = [ { index: 0, label: "XLR", icon: }, { index: 1, label: "RCA", icon: }, { index: 2, label: "耳机", icon: }, { index: 3, label: "XLR/RCA", icon: }, ]; function IOCircleButton({ option, active, onSelect, }: { option: IOOption; active: boolean; onSelect: () => void }) { return ( ); } export default function IOPage() { const [, setLocation] = useLocation(); const { deviceState, setInput, setOutput } = useDevice(); const currentInput = deviceState?.input ?? 1; const currentOutput = deviceState?.output ?? 2; return (
Input
Output