"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, } 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: "Search", href: "/search", icon: Search, permission: null, }, { title: "Admin Panel", href: "/admin", icon: Shield, permission: null, // "admin", // Temporarily visible for all }, ]; return (
{!collapsed && ( LCBP3 DMS )}
{!collapsed && Settings}
); }