import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import Link from 'next/link';
import { cn } from '../../../lib/utils.js';
export function Sidebar({ items, pathname, className }) {
    return (_jsx("nav", { className: cn('flex flex-col gap-1 p-4', className), children: items.map((item) => {
            const isActive = pathname === item.href;
            return (_jsxs(Link, { href: item.href, "aria-current": isActive ? 'page' : undefined, className: cn('flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium transition-colors', isActive
                    ? 'bg-accent text-accent-foreground'
                    : 'text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground'), children: [item.icon, item.label] }, item.href));
        }) }));
}
