import { mountCoreAppChrome as e } from "../../layout/core-app-chrome.js";
import { t } from "../../utils-BC9GT6Pr.js";
import * as n from "react";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
//#region src/react/layout/core-app-chrome.tsx
function a({ className: a, sidebarClassName: o, topbarClassName: s, basePath: c, pathname: l, scope: u, sidebarUser: d, sidebarFooterActions: f, topbarUser: p, topbarActions: m, sidebar: h, topbar: g = {}, preserveTopbarActions: _, topbarActionSelector: v, clearContainers: y }) {
	let b = n.useRef(null), x = n.useRef(null), S = n.useRef(null);
	return n.useEffect(() => {
		let t = b.current, n = g === !1 ? void 0 : x.current;
		if (t === null || g !== !1 && n === null) return;
		let r = { sidebarContainer: t };
		return c !== void 0 && (r.basePath = c), l !== void 0 && (r.pathname = l), u !== void 0 && (r.scope = u), d !== void 0 && (r.sidebarUser = d), f !== void 0 && (r.sidebarFooterActions = f), p !== void 0 && (r.topbarUser = p), m !== void 0 && (r.topbarActions = m), h !== void 0 && (r.sidebar = h), _ !== void 0 && (r.preserveTopbarActions = _), v !== void 0 && (r.topbarActionSelector = v), y !== void 0 && (r.clearContainers = y), g !== !1 && n != null && (r.topbarContainer = n, r.topbar = g), S.current = e(r), () => {
			S.current?.destroy(), S.current = null;
		};
	}, [
		c,
		l,
		u,
		d,
		f,
		p,
		m,
		h,
		g,
		_,
		v,
		y
	]), /* @__PURE__ */ i("div", {
		"data-slot": "core-app-chrome",
		className: t(a),
		children: [/* @__PURE__ */ r("div", {
			ref: b,
			"data-slot": "core-app-sidebar",
			className: t(o)
		}), g === !1 ? null : /* @__PURE__ */ r("div", {
			ref: x,
			"data-slot": "core-app-topbar",
			className: t(s)
		})]
	});
}
a.displayName = "CoreAppChrome";
//#endregion
export { a as CoreAppChrome };

//# sourceMappingURL=core-app-chrome.js.map