import { o as $ } from "./rolldown-runtime.js";
import { i as S, t as w } from "./vendor/react.js";
import { t as m } from "./createLucideIcon.js";
import { t as c } from "./chevron-right.js";
import { t as I } from "./ellipsis.js";
import { l as E } from "./useRenderElement.js";
import { t as P } from "./dist.js";
import { t as o } from "./utils.js";
import { t as z } from "./useRender.js";
var H = [["path", {
  d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
  key: "5wwlr5"
}], ["path", {
  d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
  key: "r6nss1"
}]], M = m("house", H), q = [["path", {
  d: "M22 2 2 22",
  key: "y4kqgn"
}]], R = m("slash", q), u = /* @__PURE__ */ $(S(), 1), a = w();
function b({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)("nav", {
    "aria-label": "breadcrumb",
    "data-slot": "breadcrumb",
    className: o(r),
    ...e
  });
}
function p({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)("ol", {
    "data-slot": "breadcrumb-list",
    className: o("text-muted-foreground gap-1.5 text-sm sm:gap-2.5 flex flex-wrap items-center break-words", r),
    ...e
  });
}
function f({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)("li", {
    "data-slot": "breadcrumb-item",
    className: o("gap-1.5 inline-flex items-center", r),
    ...e
  });
}
function d({ className: r, render: e, ...t }) {
  return z({
    defaultTagName: "a",
    props: E({ className: o("hover:text-foreground transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm", r) }, t),
    render: e,
    state: { slot: "breadcrumb-link" }
  });
}
function x({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)("span", {
    "data-slot": "breadcrumb-page",
    role: "link",
    "aria-disabled": "true",
    "aria-current": "page",
    className: o("text-foreground font-normal", r),
    ...e
  });
}
function g({ children: r, className: e, ...t }) {
  return /* @__PURE__ */ (0, a.jsx)("li", {
    "data-slot": "breadcrumb-separator",
    role: "presentation",
    "aria-hidden": "true",
    className: o("[&>svg]:size-3.5", e),
    ...t,
    children: r ?? /* @__PURE__ */ (0, a.jsx)(c, { className: "rtl:rotate-180" })
  });
}
function V({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsxs)("span", {
    "data-slot": "breadcrumb-ellipsis",
    role: "presentation",
    "aria-hidden": "true",
    className: o("size-5 [&>svg]:size-4 flex items-center justify-center", r),
    ...e,
    children: [/* @__PURE__ */ (0, a.jsx)(I, {}), /* @__PURE__ */ (0, a.jsx)("span", {
      className: "sr-only",
      children: "More"
    })]
  });
}
b.displayName = "Breadcrumb";
p.displayName = "BreadcrumbList";
f.displayName = "BreadcrumbItem";
d.displayName = "BreadcrumbLink";
x.displayName = "BreadcrumbPage";
g.displayName = "BreadcrumbSeparator";
V.displayName = "BreadcrumbEllipsis";
var v = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm", l = P('inline-flex items-center transition-[color,opacity,background-color,border-color,text-decoration-color] duration-200 ease-out whitespace-nowrap relative before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:min-h-11 before:content-[""] sm:before:content-none motion-reduce:transition-none', {
  variants: {
    variant: {
      text: "text-sm font-normal text-muted-foreground hover:text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current/30",
      "soft-badge": "text-xs font-normal text-primary rounded-full px-2 py-0.5 bg-primary/10 hover:bg-primary/15",
      "outline-badge": "text-xs font-normal text-foreground rounded-full px-2 py-0.5 border border-muted-foreground/50 hover:border-muted-foreground"
    },
    isCurrent: {
      true: "",
      false: ""
    }
  },
  compoundVariants: [
    {
      variant: "text",
      isCurrent: !0,
      className: "text-foreground no-underline"
    },
    {
      variant: "text",
      isCurrent: !1,
      className: "text-muted-foreground"
    },
    {
      variant: "soft-badge",
      isCurrent: !0,
      className: "bg-primary/10"
    },
    {
      variant: "soft-badge",
      isCurrent: !1,
      className: "bg-primary/10 opacity-50"
    },
    {
      variant: "outline-badge",
      isCurrent: !0,
      className: "border-primary text-foreground"
    },
    {
      variant: "outline-badge",
      isCurrent: !1,
      className: "border-muted-foreground/50 opacity-50"
    }
  ],
  defaultVariants: {
    variant: "text",
    isCurrent: !1
  }
}), y = u.createContext({ separator: "chevron" }), O = () => u.useContext(y);
function i({ className: r, separator: e = "chevron", ring: t = !1, children: s, ...n }) {
  const _ = u.useMemo(() => ({ separator: e }), [e]);
  return /* @__PURE__ */ (0, a.jsx)(y.Provider, {
    value: _,
    children: /* @__PURE__ */ (0, a.jsx)(b, {
      className: o(t && "inline-flex border border-ring/50 rounded-full px-2.5 py-0.5", r),
      ...n,
      children: s
    })
  });
}
function N({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)(p, {
    className: o("flex-nowrap gap-1", r),
    ...e
  });
}
function h({ className: r, ...e }) {
  return /* @__PURE__ */ (0, a.jsx)(f, {
    className: o("gap-1", r),
    ...e
  });
}
function B({ className: r, variant: e = "text", isCurrent: t = !1, ...s }) {
  return /* @__PURE__ */ (0, a.jsx)(d, {
    className: o(l({
      variant: e,
      isCurrent: t
    }), r),
    ...s
  });
}
function j({ className: r, variant: e = "text", ...t }) {
  return /* @__PURE__ */ (0, a.jsx)(x, {
    className: o(l({
      variant: e,
      isCurrent: !0
    }), r),
    ...t
  });
}
function C({ className: r, type: e, ...t }) {
  const { separator: s } = O(), n = e ?? s;
  return /* @__PURE__ */ (0, a.jsx)(g, {
    className: o("[&>svg]:size-3.5 text-quaternary-foreground transition-opacity duration-200 ease-out motion-reduce:transition-none", r),
    ...t,
    children: n === "slash" ? /* @__PURE__ */ (0, a.jsx)(R, {}) : /* @__PURE__ */ (0, a.jsx)(c, { className: "rtl:rotate-180" })
  });
}
function k({ className: r, variant: e = "text", ...t }) {
  return /* @__PURE__ */ (0, a.jsx)("button", {
    type: "button",
    "data-slot": "breadcrumb-ellipsis",
    "aria-label": "Show more breadcrumb items",
    className: o(l({
      variant: e,
      isCurrent: !1
    }), `cursor-pointer hover:text-foreground ${v}`, r),
    ...t,
    children: "…"
  });
}
function L({ className: r, variant: e = "text", srLabel: t = "Home", ...s }) {
  return /* @__PURE__ */ (0, a.jsxs)(d, {
    className: o(`group inline-flex items-center text-quaternary-foreground hover:text-secondary-foreground transition-colors duration-200 ease-out motion-reduce:transition-none ${v}`, e === "soft-badge" && "rounded-full px-1.5 py-0.5 bg-primary/10 text-primary", e === "outline-badge" && "rounded-full px-1.5 py-0.5 border border-muted-foreground/50", r),
    ...s,
    children: [/* @__PURE__ */ (0, a.jsx)(M, { className: "size-3.5 transition-transform duration-200 ease-out group-hover:scale-110 motion-reduce:transition-none" }), /* @__PURE__ */ (0, a.jsx)("span", {
      className: "sr-only",
      children: t
    })]
  });
}
i.displayName = "Breadcrumb";
N.displayName = "BreadcrumbList";
h.displayName = "BreadcrumbItem";
B.displayName = "BreadcrumbLink";
j.displayName = "BreadcrumbPage";
C.displayName = "BreadcrumbSeparator";
k.displayName = "BreadcrumbEllipsis";
L.displayName = "BreadcrumbHomeLink";
var W = Object.assign(i, {
  Root: i,
  List: N,
  Item: h,
  Link: B,
  Page: j,
  Separator: C,
  Ellipsis: k,
  HomeLink: L
});
export {
  B as a,
  C as c,
  h as i,
  k as n,
  N as o,
  L as r,
  j as s,
  W as t
};

//# sourceMappingURL=Breadcrumb.js.map