'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useState } from 'react'; import { LayoutDashboard, Ticket, Users, Route, DollarSign, Bell, BarChart3, Settings, LogOut, ChevronLeft, ChevronRight, Train, MapPin, CreditCard, Shield, UserCheck, Wallet, Gift, MessageSquare, AlertTriangle, FileText, Briefcase, Calendar, Utensils, Package, Moon, Sun, Armchair, Grid3x3 } from 'lucide-react'; import { useAuthStore } from '@/lib/auth-store'; import { cn } from '@/lib/utils'; import { useTheme } from '@/lib/theme-store'; const navigationSections = [ { title: 'Overview', items: [ { name: 'Dashboard', href: '/dashboard', icon: LayoutDashboard }, ] }, { title: 'Operations', items: [ { name: 'Bookings', href: '/bookings', icon: Ticket }, { name: 'Passengers', href: '/passengers', icon: Users }, { name: 'Tickets', href: '/tickets', icon: FileText }, ] }, { title: 'Master Data', items: [ { name: 'Stations', href: '/stations', icon: MapPin }, { name: 'Trains', href: '/trains', icon: Train }, { name: 'Coaches', href: '/coaches', icon: Grid3x3 }, { name: 'Seats', href: '/seats', icon: Armchair }, { name: 'Classes', href: '/classes', icon: Settings }, { name: 'Routes', href: '/routes', icon: Route }, { name: 'Schedules', href: '/schedules', icon: Calendar }, ] }, { title: 'Financial', items: [ { name: 'Pricing & Fares', href: '/pricing', icon: DollarSign }, { name: 'Payments', href: '/payments', icon: CreditCard }, { name: 'Promo Codes', href: '/promos', icon: Gift }, ] }, { title: 'Customer Services', items: [ { name: 'Loyalty Program', href: '/loyalty', icon: Gift }, { name: 'Support Center', href: '/support', icon: MessageSquare }, { name: 'Notifications', href: '/notifications', icon: Bell }, { name: 'Food & Dining', href: '/food', icon: Utensils }, ] }, { title: 'Security & Compliance', items: [ { name: 'Fraud Detection', href: '/fraud', icon: Shield }, { name: 'Verifayda Integration', href: '/verifayda', icon: UserCheck }, { name: 'Audit Logs', href: '/audit', icon: AlertTriangle }, ] }, { title: 'Analytics & Reports', items: [ { name: 'Reports', href: '/reports', icon: BarChart3 }, { name: 'Operational Reports', href: '/operational-reports', icon: FileText }, ] }, { title: 'System', items: [ { name: 'Agent Operations', href: '/agents', icon: Briefcase }, { name: 'User Management', href: '/settings/users', icon: Users }, { name: 'Settings', href: '/settings', icon: Settings }, ] } ]; export default function Sidebar() { const pathname = usePathname(); const { user, logout } = useAuthStore(); const { isDark, toggleTheme } = useTheme(); const [isCollapsed, setIsCollapsed] = useState(false); return (
{/* Header */}
{!isCollapsed && (

EDR

Back-office Passenger Portal

)}
{/* Navigation */}
); }