'use client'; import { CreditCard, Gift, Key, LayoutDashboard, LogOut, Menu, Monitor, Package, Settings, Shield, Users } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useState } from 'react'; import { Button } from '@/components/ui/button'; import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; import { useAuthStore } from '@/lib/auth-store'; import { cn } from '@/lib/utils'; const navigation = [ { name: 'Dashboard', href: '/dashboard', icon: LayoutDashboard }, { name: 'Users', href: '/dashboard/users', icon: Users }, { name: 'Products', href: '/dashboard/products', icon: Package }, { name: 'Licenses', href: '/dashboard/licenses', icon: Key }, { name: 'Machines', href: '/dashboard/machines', icon: Monitor }, { name: 'Policies', href: '/dashboard/policies', icon: Shield }, { name: 'Tokens', href: '/dashboard/tokens', icon: CreditCard }, { name: 'Entitlements', href: '/dashboard/entitlements', icon: Gift }, ]; export function DashboardNav() { const [isOpen, setIsOpen] = useState(false); const pathname = usePathname(); const { logout, user } = useAuthStore(); const handleLogout = () => { logout(); window.location.href = '/'; }; const NavContent = () => (
{user?.email}
Admin