import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Link from "next/link";
import { Text } from "../../../components/atoms/Text";
import { Icon } from "../../../components/atoms/Icon";
import { cn } from "../../../utils/cn";
export const Breadcrumbs = ({ items, className, }) => {
    return (_jsx("nav", { className: cn("flex items-center gap-2", className), "aria-label": "Breadcrumb", children: _jsx("ol", { className: "flex items-center gap-2", role: "list", children: items.map((item, index) => {
                const isLast = index === items.length - 1;
                return (_jsxs("li", { className: "flex items-center gap-2", children: [index > 0 && (_jsx(Icon, { size: "sm", className: "text-neutral-400 dark:text-neutral-500", children: _jsx("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })), isLast ? (_jsx(Text, { variant: "small", className: "text-neutral-900 dark:text-white font-medium", "aria-current": "page", children: item.label })) : item.href ? (_jsx(Link, { href: item.href, className: "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors", children: _jsx(Text, { variant: "small", children: item.label }) })) : (_jsx(Text, { variant: "small", className: "text-neutral-600 dark:text-neutral-400", children: item.label }))] }, index));
            }) }) }));
};
export default Breadcrumbs;
