"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useSession } from "next-auth/react"; import { cn } from "@/lib/utils"; import { LayoutDashboard, Search, Quote, FileDown, Settings, Shield, FolderKanban, Stethoscope, Lightbulb, FileEdit, Send, BarChart3, Bot, Users, Blocks, } from "lucide-react"; const baseNavItems = [ { name: "数据总览", href: "/dashboard", icon: LayoutDashboard }, { name: "项目管理", href: "/dashboard/lifecycle", icon: FolderKanban }, { name: "诊断分析", href: "/dashboard/diagnosis", icon: Stethoscope }, { name: "策略制定", href: "/dashboard/strategy", icon: Lightbulb }, { name: "内容管理", href: "/dashboard/content", icon: FileEdit }, { name: "内容编辑器", href: "/dashboard/content/editor", icon: FileEdit }, { name: "分发执行", href: "/dashboard/publishing", icon: Send }, { name: "监测优化", href: "/dashboard/monitoring", icon: BarChart3 }, { name: "AI Agent", href: "/dashboard/agents", icon: Bot }, { name: "客户管理", href: "/dashboard/clients", icon: Users }, { name: "查询管理", href: "/dashboard/queries", icon: Search }, { name: "引用记录", href: "/dashboard/citations", icon: Quote }, { name: "报告导出", href: "/dashboard/reports", icon: FileDown }, { name: "平台规则", href: "/dashboard/settings/platforms", icon: Blocks }, { name: "设置", href: "/dashboard/settings", icon: Settings }, ]; export function Sidebar() { const pathname = usePathname(); const { data: session } = useSession(); const navItems = session?.user?.is_admin ? [ ...baseNavItems, { name: "管理后台", href: "/dashboard/admin", icon: Shield }, ] : baseNavItems; return ( ); }