"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; import { adminHasAnyPermission } from "@/lib/admin-permissions"; import { useAdminProfile } from "@/stores/admin-session"; const RECONCILE_PERMS = [ "prd.wallet_reconcile.manage", "prd.wallet_reconcile.view", "prd.wallet_reconcile.view_cs", ] as const; const tabs: { href: string; label: string; requiredAny: readonly string[] }[] = [ { href: "/admin/wallet/transactions", label: "钱包流水", requiredAny: RECONCILE_PERMS }, { href: "/admin/wallet/transfer-orders", label: "转账单", requiredAny: RECONCILE_PERMS }, ]; export function WalletSubnav(): React.ReactElement { const pathname = usePathname(); const profile = useAdminProfile(); const perms = profile?.permissions; return ( ); }