import { SidebarMenuDiv, SidebarMenuItem, SidebarMenuSub } from "../../components/ui/sidebar.js";
import NavigationItems_default from "./NavigationItems.js";
import { c } from "react/compiler-runtime";
import React from "react";
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
import { RectangleHorizontal } from "lucide-react";
var WorkbenchNavigation_default = (d) => {
	let f = c(6), { namespaceTree: p, indent: m } = d, h, g;
	if (f[0] !== m || f[1] !== p) {
		g = Symbol.for("react.early_return_sentinel");
		bb0: {
			let l = (u, d) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsxs(SidebarMenuItem, { children: [/* @__PURE__ */ jsx(SidebarMenuDiv, {
				className: "hover:bg-accent-sidebar-foreground w-full justify-between",
				style: { paddingLeft: `${d * 16 + 8}px` },
				children: /* @__PURE__ */ jsxs("div", {
					className: "flex min-w-0 items-center gap-2",
					children: [/* @__PURE__ */ jsx(RectangleHorizontal, { className: "h-4 w-4 flex-shrink-0 text-gray-500" }), /* @__PURE__ */ jsx("span", {
						className: "truncate",
						children: u.name
					})]
				})
			}), /* @__PURE__ */ jsx(SidebarMenuSub, {
				style: { marginLeft: `${d * 16 + 8}px` },
				children: /* @__PURE__ */ jsx(NavigationItems_default, { namespace: u })
			})] }), u.childNodes?.map((e) => l(e, d + 1))] }, u.id);
			if (!p || p.length === 0) {
				g = null;
				break bb0;
			}
			h = p.map((e) => l(e, m));
		}
		f[0] = m, f[1] = p, f[2] = h, f[3] = g;
	} else h = f[2], g = f[3];
	if (g !== Symbol.for("react.early_return_sentinel")) return g;
	let _;
	return f[4] === h ? _ = f[5] : (_ = /* @__PURE__ */ jsx(Fragment$1, { children: h }), f[4] = h, f[5] = _), _;
};
export { WorkbenchNavigation_default as default };
