"use client"; import { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import Image from "next/image"; import { signOut } from "next-auth/react"; const NAV_ITEMS: { href: string; label: string; icon: string }[] = [ { href: "/admin", label: "Dashboard", icon: "📊" }, { href: "/admin/trips", label: "Trips", icon: "🧭" }, { href: "/admin/users", label: "Users", icon: "👥" }, { href: "/admin/verifications", label: "Verifikasi", icon: "🪪" }, { href: "/admin/refunds", label: "Refund", icon: "↩️" }, { href: "/admin/payouts", label: "Payout", icon: "💸" }, { href: "/admin/system", label: "System", icon: "⚙️" }, ]; interface AdminSidebarProps { user: { name: string; email: string }; } export function AdminSidebar({ user }: AdminSidebarProps) { const pathname = usePathname(); const [open, setOpen] = useState(false); return ( <> {/* Mobile top bar */} SeTrip Admin setOpen((v) => !v)} className="flex h-9 w-9 items-center justify-center rounded-lg text-neutral-600 hover:bg-neutral-100" aria-label="Toggle menu" aria-expanded={open} > {open ? ( ) : ( )} {/* Mobile drawer backdrop */} {open && ( setOpen(false)} className="fixed inset-0 z-30 bg-neutral-900/30 lg:hidden" /> )} {/* Sidebar */} > ); }