"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; import { LayoutDashboard, FileText, FileCheck, PenTool, Search, Settings, Shield, Menu, Layers, BookOpen, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useState } from "react"; import { Can } from "@/components/common/can"; interface SidebarProps { className?: string; } export function Sidebar({ className }: SidebarProps) { const pathname = usePathname(); const [collapsed, setCollapsed] = useState(false); const navItems = [ { title: "Dashboard", href: "/dashboard", icon: LayoutDashboard, permission: null, // Everyone can see }, { title: "Correspondences", href: "/correspondences", icon: FileText, permission: null, }, { title: "RFAs", href: "/rfas", icon: FileCheck, permission: null, }, { title: "Drawings", href: "/drawings", icon: PenTool, permission: null, }, { title: "Circulations", href: "/circulation", icon: Layers, // Start with generic icon, maybe update import if needed permission: null, }, { title: "Transmittals", href: "/transmittals", icon: FileText, permission: null, }, { title: "Search", href: "/search", icon: Search, permission: null, }, { title: "Admin Panel", href: "/admin", icon: Shield, permission: null, }, { title: "Security", href: "/admin/security/roles", icon: Shield, permission: "system.manage_security", }, { title: "System Logs", href: "/admin/system-logs/numbering", icon: Layers, permission: "system.view_logs", }, { title: "Reference Data", href: "/admin/reference", icon: BookOpen, permission: "master_data.view", }, ]; return (
{!collapsed && ( LCBP3 DMS )}
{!collapsed && Settings}
); }