/* ============================================================ BOTTOM NAV — Luxsin X9 Controller (Mobile) Design: iOS/Android App-style bottom tab bar 5 tabs — labels from locales/bottomNav, language = deviceState.language (同系统页) - 社区:移动端进入 /community 引导复制链接;桌面(lg+)点击仍 window.open 论坛 - Active tab: cyan icon + top indicator bar - Inactive: muted icon + label ============================================================ */ import { useDevice } from "@/contexts/DeviceContext"; import { cn } from "@/lib/utils"; import { readAndClearAiSplitRestorePath, useAIDrawer } from "@/contexts/AIDrawerContext"; import { useIsLgUp } from "@/hooks/useIsLgUp"; import localeZh from "@/locales/data-zh.json"; import localeEn from "@/locales/data-en.json"; import { resolveLocalePack } from "@/locales/resolveLocale"; import { Activity, Bot, Home, MessageSquare, Sliders, } from "lucide-react"; import { Link, useLocation } from "wouter"; import { useMemo } from "react"; import { bottomNavInnerClass, bottomNavOuterClass } from "@/lib/appShell"; type BottomNavLocale = NonNullable<(typeof localeZh)["bottomNav"]>; interface NavItem { path: string; icon: React.ComponentType<{ size?: number; className?: string }>; labelKey: keyof BottomNavLocale; } const FORUM_URL = "https://forum.zidoo.tv/index.php"; const NAV_ITEMS: NavItem[] = [ { path: "/community", icon: MessageSquare, labelKey: "community" }, { path: "/eq", icon: Sliders, labelKey: "hpEq" }, { path: "/", icon: Home, labelKey: "home" }, { path: "/effects", icon: Activity, labelKey: "effects" }, { path: "/ai", icon: Bot, labelKey: "myAi" }, ]; export default function BottomNav() { const [location, setLocation] = useLocation(); const isLgUp = useIsLgUp(); const { open: aiDrawerOpen, setOpen: setAiDrawerOpen } = useAIDrawer(); const { deviceState } = useDevice(); const navText = useMemo((): BottomNavLocale => { const pack = resolveLocalePack(deviceState?.language); return (pack.bottomNav ?? localeEn.bottomNav) as BottomNavLocale; }, [deviceState?.language]); return ( ); }