'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { useState } from 'react' import { CreditCard, ListCheck, Person, PlugConnection, Thunderbolt, Xmark, Bars } from '@gravity-ui/icons' import SidebarFooter from '@/components/sidebar-footer' import { useSession } from '@/lib/auth-client' const navItems = [ { href: '/dashboard', label: '概览', icon: Thunderbolt, exact: true, adminOnly: false }, { href: '/dashboard/charge-points', label: '充电桩', icon: PlugConnection, adminOnly: false }, { href: '/dashboard/transactions', label: '充电记录', icon: ListCheck, adminOnly: false }, { href: '/dashboard/id-tags', label: '储值卡', icon: CreditCard, adminOnly: false }, { href: '/dashboard/users', label: '用户管理', icon: Person, adminOnly: true }, ] function NavContent({ pathname, isAdmin, onNavigate }: { pathname: string; isAdmin: boolean; onNavigate?: () => void }) { return ( <> {/* Logo */}