import { jsx as a, jsxs as L } from "react/jsx-runtime";
import { Children as I, cloneElement as Z } from "react";
import { b as j } from "./icon-DNHpBTHs-JfI8WyiR.mjs";
import { c as C } from "./bind-CU-R61T-.mjs";
const S = {
  name: "home",
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M11.38 1.848a.9.9 0 0 1 1.24 0l8.69 8.276c1.242 1.183.405 3.276-1.31 3.276h-.6v8.1a.9.9 0 0 1-.9.9h-13a.9.9 0 0 1-.9-.9v-8.1H4c-1.715 0-2.552-2.093-1.31-3.276l8.69-8.276ZM12 3.743l-8.069 7.685c-.026.024-.03.04-.032.049a.11.11 0 0 0 .008.06.11.11 0 0 0 .036.049c.007.005.021.014.057.014h1.5a.9.9 0 0 1 .9.9v8.1h11.2v-8.1a.9.9 0 0 1 .9-.9H20c.036 0 .05-.009.057-.014a.111.111 0 0 0 .036-.049.111.111 0 0 0 .008-.06c-.002-.008-.006-.025-.032-.05L12 3.744ZM10.6 14a.9.9 0 0 1 .9-.9H15a.9.9 0 0 1 .9.9v4a.9.9 0 0 1-.9.9h-3.5a.9.9 0 0 1-.9-.9v-4Zm1.8.9v2.2h1.7v-2.2h-1.7Z" clip-rule="evenodd"/></svg>',
  keywords: ["home"],
  category: "buildings"
}, w = (e) => /* @__PURE__ */ a(j, { ...e, svg: S });
w.displayName = "IconHome";
const i = {
  "purpur-breadcrumbs": "_purpur-breadcrumbs_x1byg_1",
  "purpur-breadcrumbs__list": "_purpur-breadcrumbs__list_x1byg_4",
  "purpur-breadcrumb-item": "_purpur-breadcrumb-item_x1byg_14",
  "purpur-breadcrumb-item__element": "_purpur-breadcrumb-item__element_x1byg_19",
  "purpur-breadcrumb-item__link": "_purpur-breadcrumb-item__link_x1byg_28",
  "purpur-breadcrumb-item--default": "_purpur-breadcrumb-item--default_x1byg_32",
  "purpur-breadcrumb-item--negative": "_purpur-breadcrumb-item--negative_x1byg_46",
  "purpur-breadcrumb-item--current": "_purpur-breadcrumb-item--current_x1byg_60",
  "purpur-breadcrumb-item__home": "_purpur-breadcrumb-item__home_x1byg_93"
}, E = (e, s, r) => {
  const c = {
    "@type": "ListItem",
    position: s,
    name: e
  };
  return r && (c.item = r), c;
}, z = (e) => JSON.stringify({
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  itemListElement: e
}), l = C.bind(i), x = "purpur-breadcrumbs", t = "purpur-breadcrumb-item", J = ({
  ["aria-label"]: e,
  baseUrl: s,
  children: r,
  className: c,
  excludeCurrentPage: p = !1,
  linkElement: o = "a",
  meta: b = !0,
  negative: m = !1,
  highlightLast: _ = !0,
  hideHomeIcon: u,
  ...d
}) => {
  const h = l([
    x,
    `${x}--${m ? "negative" : "default"}`,
    c
  ]), n = I.count(r), g = [], k = I.map(r, (f, H) => {
    const v = H + 1, $ = n === v, B = _ && $, { children: M, href: N } = f.props;
    return g.push(E(M, v, N && `${s}${N}`)), Z(f, {
      className: f.props.className,
      current: B,
      negative: m,
      first: !u && v === 1,
      last: $,
      linkElement: o,
      excludeCurrentPage: p
    });
  }), y = g.length === n ? z(g) : null;
  return /* @__PURE__ */ L("nav", { "aria-label": e, className: h, ...d, children: [
    /* @__PURE__ */ a("ol", { className: i[`${x}__list`], children: k }),
    b && y ? /* @__PURE__ */ a(
      "script",
      {
        type: "application/ld+json",
        "data-testid": "breadcrumbs-meta",
        dangerouslySetInnerHTML: { __html: y }
      }
    ) : null
  ] });
}, O = ({
  href: e,
  ["data-testid"]: s,
  children: r,
  current: c = !1,
  linkElement: p = "a",
  negative: o = !1,
  onClick: b,
  first: m = !1,
  last: _ = !1,
  excludeCurrentPage: u = !1,
  ...d
}) => {
  const h = p, n = l(
    [t],
    i[`${t}--${o ? "negative" : "default"}`],
    {
      [`${t}--current`]: !u && c
    }
  );
  return /* @__PURE__ */ a("li", { ...d, className: n, children: !_ || u ? /* @__PURE__ */ L(
    h,
    {
      href: e,
      "data-testid": s,
      onClick: b,
      className: l(`${t}__element`, `${t}__link`),
      children: [
        m && /* @__PURE__ */ a("span", { className: i[`${t}__home`], "aria-hidden": "true", children: /* @__PURE__ */ a(w, { size: "xs" }) }),
        r
      ]
    }
  ) : /* @__PURE__ */ a(
    "span",
    {
      "aria-current": "page",
      "data-testid": s,
      className: l(`${t}__element`),
      children: r
    }
  ) });
};
J.Item = O;
export {
  J as B,
  O as I
};
//# sourceMappingURL=breadcrumbs-BtA7VLmX.mjs.map
