import Link from "next/link"; import { Bell, BedDouble, Building2, ClipboardCheck, HeartPulse, Home, LayoutDashboard, ListChecks, Radio, Settings, ShieldAlert, Stethoscope, TabletSmartphone, Users, Wrench, } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import type { Permission, PublicAccount } from "@/modules/core/types"; import { SignOutButton } from "@/modules/auth/components/SignOutButton"; type NavItem = { href: string; label: string; icon: LucideIcon; }; type NavGroup = { label: string; items: NavItem[]; }; const navGroups: NavGroup[] = [ { label: "运营", items: [ { href: "/app/dashboard", label: "运营看板", icon: LayoutDashboard, }, { href: "/app/elders", label: "老人档案", icon: Users, }, { href: "/app/beds", label: "床位房间", icon: BedDouble, }, { href: "/app/health", label: "健康照护", icon: HeartPulse, }, { href: "/app/care", label: "护理服务", icon: ClipboardCheck, }, { href: "/app/emergency", label: "安全应急", icon: ShieldAlert, }, ], }, { label: "协同", items: [ { href: "/app/devices", label: "设备运维", icon: Wrench, }, { href: "/app/notices", label: "公告通知", icon: Bell, }, { href: "/app/alerts", label: "规则预警", icon: Radio, }, { href: "/app/family", label: "家属服务", icon: TabletSmartphone, }, ], }, { label: "系统设置", items: [ { href: "/app/settings/organizations", label: "机构管理", icon: Building2, }, { href: "/app/settings/users", label: "用户管理", icon: Users, }, { href: "/app/settings/roles", label: "角色权限", icon: Settings, }, { href: "/app/settings/audit", label: "审计日志", icon: ListChecks, }, { href: "/app/settings/status", label: "运行状态", icon: Wrench, }, ], }, ]; const navItems: NavItem[] = navGroups.flatMap((group) => group.items); type AppShellProps = { children: React.ReactNode; account: PublicAccount; permissions: Permission[]; }; export function AppShell({ children, account, permissions }: AppShellProps): React.ReactElement { const canCreateElder = permissions.includes("elder:create"); return (

工作台

{account.name}

{account.email}

{children}
); } export { navItems };