import { Columns3, Home, Inbox, LayoutDashboard, Link2, Settings, Shield, } from "lucide-react"; export type NavLink = { to: string; label: string; icon: typeof Home; activePaths?: string[]; }; export const NAV_LINKS: NavLink[] = [ { to: "/overview", label: "Overview", icon: Home }, { to: "/jobs/ready", label: "Jobs", icon: LayoutDashboard, activePaths: [ "/jobs/ready", "/jobs/discovered", "/jobs/applied", "/jobs/all", ], }, { to: "/applications/in-progress", label: "In Progress", icon: Columns3, activePaths: ["/applications/in-progress"], }, { to: "/tracking-inbox", label: "Tracking Inbox", icon: Inbox }, { to: "/tracer-links", label: "Tracer Links", icon: Link2, activePaths: ["/tracer-links"], }, { to: "/visa-sponsors", label: "Visa Sponsors", icon: Shield }, { to: "/settings", label: "Settings", icon: Settings }, ]; export const isNavActive = ( pathname: string, to: string, activePaths?: string[], ) => { if (pathname === to) return true; if (!activePaths) return false; return activePaths.some( (path) => pathname === path || pathname.startsWith(`${path}/`), ); };