import { cx as e } from "../../../theme/tools.js";
import { breadcrumbChevron as t, breadcrumbChevronButton as n, breadcrumbChevronOpen as r, breadcrumbLink as i, breadcrumbNameRow as a, breadcrumbSection as o, popoverPanel as s } from "./breadcrumbNavigation.css.js";
import { ChevronDownSvg as c } from "../../../icons/ChevronDownSvg.js";
import { Dropdown as l } from "../dropdown/Dropdown.js";
import { BreadcrumbMenuPopover as u } from "./BreadcrumbMenuPopover.js";
import { jsx as d, jsxs as f } from "react/jsx-runtime";
import p from "@plumile/router/routing/Link.js";
//#region src/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.tsx
var m = ({ node: m, menu: h, ariaLabel: g, searchPlaceholder: _, searchAriaLabel: v, emptyLabel: y, emptyMatchesLabel: b }) => {
	let x = h?.items ?? [];
	return h == null ? /* @__PURE__ */ d("div", {
		className: o,
		children: /* @__PURE__ */ d("div", {
			className: a,
			children: /* @__PURE__ */ d(p, {
				to: m.to,
				className: i,
				children: m.name
			})
		})
	}) : /* @__PURE__ */ d("div", {
		className: o,
		children: /* @__PURE__ */ f("div", {
			className: a,
			children: [/* @__PURE__ */ d(p, {
				to: m.to,
				className: i,
				children: m.name
			}), /* @__PURE__ */ d(l, {
				trigger: (i) => /* @__PURE__ */ d("button", {
					type: "button",
					className: n,
					children: /* @__PURE__ */ d(c, {
						width: 14,
						height: 14,
						className: e(t, { [r]: i })
					})
				}),
				ariaLabel: g,
				placement: "bottom-start",
				matchTriggerWidth: !1,
				contentRole: "dialog",
				contentAriaLabel: g,
				contentClassName: s,
				children: /* @__PURE__ */ d(u, {
					items: x,
					selectedId: h.selectedId,
					searchPlaceholder: _,
					searchAriaLabel: v,
					emptyLabel: y,
					emptyMatchesLabel: b
				})
			})]
		})
	});
};
//#endregion
export { m as BreadcrumbMenuDropdown };

//# sourceMappingURL=BreadcrumbMenuDropdown.js.map