import { NavLink } from "react-router-dom"; import { LayoutDashboard, Shield, FlaskConical, BookOpen, Settings, Users, FileText, } from "lucide-react"; import { useAuth } from "../context/AuthContext"; const baseLinks = [ { to: "/dashboard", label: "Dashboard", icon: LayoutDashboard }, { to: "/techniques", label: "Techniques", icon: Shield }, { to: "/tests", label: "Tests", icon: FlaskConical }, { to: "/test-catalog", label: "Test Catalog", icon: BookOpen }, ]; const adminLinks = [ { to: "/users", label: "Users", icon: Users }, { to: "/audit", label: "Audit Log", icon: FileText }, { to: "/system", label: "System", icon: Settings }, ]; export default function Sidebar() { const { user } = useAuth(); const isAdmin = user?.role === "admin"; const links = isAdmin ? [...baseLinks, ...adminLinks] : baseLinks; return ( ); }