"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import type { ReactNode } from "react"; type NavItem = { href: string; label: string; icon: ReactNode; badge?: number; }; type NavGroup = { label: string; items: NavItem[]; }; const ICONS = { dashboard: ( ), carbets: ( ), bookings: ( ), users: ( ), organizations: ( ), pirogue: ( ), reviews: ( ), media: ( ), pages: ( ), plugins: ( ), settings: ( ), audit: ( ), }; const GROUPS: NavGroup[] = [ { label: "Vue d'ensemble", items: [{ href: "/admin", label: "Dashboard", icon: ICONS.dashboard }], }, { label: "Catalogue", items: [ { href: "/admin/carbets", label: "Carbets", icon: ICONS.carbets }, { href: "/admin/pirogue-providers", label: "Prestataires pirogue", icon: ICONS.pirogue }, { href: "/admin/media", label: "Médias", icon: ICONS.media }, ], }, { label: "Activité", items: [ { href: "/admin/bookings", label: "Réservations", icon: ICONS.bookings }, { href: "/admin/reviews", label: "Avis & modération", icon: ICONS.reviews }, ], }, { label: "Membres", items: [ { href: "/admin/users", label: "Utilisateurs", icon: ICONS.users }, { href: "/admin/organizations", label: "Organisations CE", icon: ICONS.organizations }, ], }, { label: "Contenu", items: [{ href: "/admin/content-pages", label: "Pages éditoriales", icon: ICONS.pages }], }, { label: "Système", items: [ { href: "/admin/plugins", label: "Plugins", icon: ICONS.plugins }, { href: "/admin/settings", label: "Paramètres", icon: ICONS.settings }, { href: "/admin/audit", label: "Audit log", icon: ICONS.audit }, ], }, ]; export function Sidebar() { const pathname = usePathname(); return ( ); }