"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { signOut } from "next-auth/react"; import { LayoutDashboard, Users, FolderOpen, Tag, TrendingUp, BookOpen, Settings, LogOut, Zap, } from "lucide-react"; const NAV_ITEMS = [ { href: "/admin", label: "Dashboard", icon: LayoutDashboard, exact: true }, { href: "/admin/clients", label: "Clienti", icon: Users }, { href: "/admin/leads", label: "Lead", icon: Zap }, { href: "/admin/projects", label: "Progetti", icon: FolderOpen }, { href: "/admin/offers", label: "Offerte", icon: Tag }, { href: "/admin/forecast", label: "Forecast", icon: TrendingUp }, { href: "/admin/catalog", label: "Catalogo", icon: BookOpen }, { href: "/admin/impostazioni", label: "Impostazioni", icon: Settings }, ]; export function AdminSidebar() { const pathname = usePathname(); const isActive = (href: string, exact?: boolean) => exact ? pathname === href : pathname === href || pathname.startsWith(href + "/"); return ( ); }