import React, { useState } from 'react'; import { Link, usePage } from '@inertiajs/react'; import { LayoutDashboard, Users, Briefcase, CreditCard, Megaphone, Settings, LogOut, Menu, Bell, Shield, BadgeDollarSign, ShieldCheck, ShieldAlert, BellRing, BarChart3, History, List, LifeBuoy } from 'lucide-react'; import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; export default function AdminLayout({ children, title = 'Dashboard' }) { const { url, props } = usePage(); const { auth } = props; const user = auth?.user || { name: 'Admin Portal', email: 'admin@marketplace.com' }; const [open, setOpen] = useState(false); const navItems = [ { name: 'Dashboard', href: '/admin/dashboard', icon: LayoutDashboard }, { name: 'Worker Profiles', href: '/admin/workers', icon: Users }, { name: 'Employers', href: '/admin/employers', icon: Briefcase }, { name: 'OCR Verification', href: '/admin/workers/verifications', icon: ShieldCheck }, { name: 'Safety & Moderation', href: '/admin/safety', icon: ShieldAlert }, { name: 'Support Tickets', href: '/admin/tickets', icon: LifeBuoy }, { name: 'Payments', href: '/admin/payments', icon: BadgeDollarSign }, { name: 'Campaigns & Alerts', href: '/admin/notifications', icon: BellRing }, { name: 'Reports & Analytics', href: '/admin/analytics', icon: BarChart3 }, { name: 'System Audit Logs', href: '/admin/audit-logs', icon: History }, { name: 'Announcements', href: '/admin/announcements', icon: Megaphone }, { name: 'Skills', href: '/admin/master-data/skills', icon: Settings }, { name: 'Reason Master', href: '/admin/master-data/reasons', icon: List }, ]; const getInitials = (name) => { return name ?.split(' ') .map((n) => n[0]) .join('') .toUpperCase() || 'A'; }; const SidebarContent = ({ isMobile }) => (
{user.name}
{user.email}