import Link from "next/link"; import type { LucideIcon } from "lucide-react"; import type { ReactNode } from "react"; import { AppCard } from "@/components/ui/app-card"; import { CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { cn } from "@/lib/utils"; type SidebarItem = { label: string; href: string; icon: LucideIcon; active?: boolean; children?: SidebarItem[]; }; type AppSidebarProps = { title: string; description: string; items: SidebarItem[]; footer?: ReactNode; }; export function AppSidebar({ title, description, items, footer, }: AppSidebarProps) { const portfolioItem = items.find((item) => item.href === "/root/portfolio"); const systemOrder = ["/root", "/root/media", "/root/maintenance", "/root/ui-kit"]; const systemItems = items .filter((item) => item.href !== "/root/portfolio") .sort((left, right) => systemOrder.indexOf(left.href) - systemOrder.indexOf(right.href)); function renderItem(item: SidebarItem, nested = false) { const Icon = item.icon; return (
Root Access
{description}