"use client"; import { BadgeCheck, Cat, ClipboardCheck, Copy, Dumbbell, Image as ImageIcon, type LucideIcon, Puzzle, RefreshCw, Shirt, Upload, Wrench, } from "lucide-react"; import { usePathname } from "next/navigation"; import Link from "@/components/link"; import { cn } from "@/lib/utils"; const TABS: { href: string; label: string; icon: LucideIcon }[] = [ { href: "/admin/studio/furni", label: "Furni", icon: Puzzle }, { href: "/admin/studio/upload", label: "Upload", icon: Upload }, { href: "/admin/studio/badges", label: "Badges", icon: BadgeCheck }, { href: "/admin/studio/clothing", label: "Clothing", icon: Shirt }, { href: "/admin/studio/effects", label: "Effects", icon: Dumbbell }, { href: "/admin/studio/pets", label: "Pets", icon: Cat }, { href: "/admin/studio/clone", label: "Clone", icon: Copy }, { href: "/admin/studio/sync", label: "Sync", icon: RefreshCw }, { href: "/admin/studio/repair-icons", label: "Repair Icons", icon: ImageIcon, }, { href: "/admin/studio/audit", label: "Audit", icon: ClipboardCheck }, { href: "/admin/studio/maintenance", label: "Catalogus onderhoud", icon: Wrench, }, ]; export default function StudioLayout({ children, }: { children: React.ReactNode; }) { const pathname = usePathname() ?? ""; return (
{TABS.map(({ href, label, icon: Icon }) => { const active = pathname === href || pathname.startsWith(`${href}/`); return ( {label} ); })}
{children}
); }