import { t as e } from "../chunks/clsx.js";
import { getComplementaryTextColor as t, getThemeColor as n } from "./helpers/colors/colors.js";
import { createElement as r } from "react";
import { Icon as i } from "@clubmed/trident-icons";
import { jsx as a } from "react/jsx-runtime";
//#region lib/ui/Breadcrumb.tsx
var o = ({ className: o, items: s, theme: c = "light", ...l }) => {
	if (s.length == 0) return null;
	let u = t(n(c)), d = u === "text-white" ? u : "text-middleGrey", [f, p, , ...m] = s, h = m.length ? m[m.length - 1] : s[s.length - 1], g = m.length ? [
		f,
		p,
		{
			label: "…",
			href: ""
		},
		h
	] : s;
	return /* @__PURE__ */ a("nav", {
		"aria-label": "Breadcrumb",
		...l,
		className: e(o, "overflow-hidden"),
		children: /* @__PURE__ */ a("ul", {
			className: "scrollbar-hidden text-b4 flex items-center overflow-x-auto font-sans",
			children: g.map(({ label: t, href: n }, o) => {
				let s = o === g.length - 1, c = n && !s;
				return /* @__PURE__ */ r("li", {
					...s && { "aria-current": "page" },
					className: e("flex shrink-0 items-center", { [d]: !s }, {
						"font-bold": s,
						[u]: s
					}),
					key: t
				}, c ? /* @__PURE__ */ a("a", {
					href: n,
					children: t
				}) : t, !s && /* @__PURE__ */ a(i, {
					className: "mx-4",
					name: "Diamond",
					width: "14px"
				}));
			})
		})
	});
};
//#endregion
export { o as Breadcrumb };

//# sourceMappingURL=Breadcrumb.js.map