import { Link, useLocation } from 'react-router-dom' import { LayoutDashboard, Building2, Ticket, FileText, Gauge, ToggleLeft, Settings, FolderTree, ClipboardList, MessageSquareText, LayoutGrid, ArrowLeft, } from 'lucide-react' import { cn } from '@/lib/utils' const navItems = [ { path: '/admin', label: 'Dashboard', icon: LayoutDashboard, end: true }, { path: '/admin/accounts', label: 'Accounts', icon: Building2 }, { path: '/admin/invite-codes', label: 'Invite Codes', icon: Ticket }, { path: '/admin/audit-logs', label: 'Audit Logs', icon: FileText }, { path: '/admin/plan-limits', label: 'Plan Limits', icon: Gauge }, { path: '/admin/feature-flags', label: 'Feature Flags', icon: ToggleLeft }, { path: '/admin/settings', label: 'Settings', icon: Settings }, { path: '/admin/categories', label: 'Categories', icon: FolderTree }, { path: '/admin/survey-invites', label: 'Survey Invites', icon: ClipboardList }, { path: '/admin/survey-responses', label: 'Survey Responses', icon: MessageSquareText }, { path: '/admin/gallery', label: 'Gallery', icon: LayoutGrid }, ] interface AdminSidebarProps { className?: string onNavigate?: () => void } export function AdminSidebar({ className, onNavigate }: AdminSidebarProps) { const location = useLocation() const isActive = (path: string, end?: boolean) => { if (end) return location.pathname === path return location.pathname.startsWith(path) } return ( ) } export default AdminSidebar