"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { LayoutGrid, Package, QrCode, ShieldCheck, BarChart3, Settings, ShieldHalf, LogOut, CreditCard, } from "lucide-react"; import { cn } from "@/lib/utils"; import { clearToken } from "@/lib/api"; import { useLanguage } from "@/contexts/LanguageContext"; export default function Sidebar({ org, open = false, onClose }: { org?: any; open?: boolean; onClose?: () => void }) { const path = usePathname(); const { t } = useLanguage(); const nav = [ { href: "/dashboard", label: t.dashboard, icon: LayoutGrid }, { href: "/dashboard/products", label: t.products, icon: Package }, { href: "/dashboard/qr", label: t.qr_management, icon: QrCode }, { href: "/dashboard/compliance", label: t.compliance, icon: ShieldCheck }, { href: "/dashboard/analytics", label: t.analytics, icon: BarChart3 }, { href: "/dashboard/billing", label: t.billing, icon: CreditCard }, { href: "/dashboard/settings", label: t.settings_menu, icon: Settings }, ]; function onLogout() { clearToken(); window.location.href = "/login"; } return ( <> {open &&
} > ); }