import { jsx, jsxs } from "react/jsx-runtime";
import Link from "next/link";
import { ChevronRight } from "lucide-react";
function DocsBreadcrumbs({ items }) {
  return /* @__PURE__ */ jsx(
    "nav",
    {
      "aria-label": "Breadcrumb",
      className: "flex items-center space-x-2 text-sm",
      "data-cy": "docs-breadcrumbs",
      children: items.map((item, index) => {
        const isLast = index === items.length - 1;
        return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
          index > 0 && /* @__PURE__ */ jsx(
            ChevronRight,
            {
              className: "h-4 w-4 mx-2 text-muted-foreground",
              "aria-hidden": "true"
            }
          ),
          isLast || !item.href ? /* @__PURE__ */ jsx(
            "span",
            {
              className: "text-foreground font-medium",
              "aria-current": "page",
              "data-cy": `breadcrumb-${index}`,
              children: item.label
            }
          ) : /* @__PURE__ */ jsx(
            Link,
            {
              href: item.href,
              className: "text-muted-foreground hover:text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",
              "data-cy": `breadcrumb-link-${index}`,
              children: item.label
            }
          )
        ] }, index);
      })
    }
  );
}
export {
  DocsBreadcrumbs
};
