"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"; import { AdminSearchBar } from "@/features/admin/components/admin-search-bar"; 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/audit-log", label: "Audit Log", 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 */} > ); }