import { cx as e } from "../../../theme/tools.js";
import { EntityHeader as t } from "../../organisms/entity_header/EntityHeader.js";
import { body as n, bodyRow as r, bodyViewportBase as i, bodyViewportContained as a, bodyViewportPage as o, container as s, containerContained as c, containerRows as l, contentSection as u, headerCard as d, headerCardFlatDensity as f, headerCardFramedDensity as p, rowSingle as m, rowSplit as h, rowSplitBase as g, sidePanelBase as _, sidePanelCard as v, sidePanelPlain as y, sidePanelTopVar as b, staticRow as x } from "./detailPageTemplate.css.js";
import { jsx as S, jsxs as C } from "react/jsx-runtime";
//#region src/backoffice/templates/detail_page_template/DetailPageTemplate.tsx
var w = (u) => {
	let { children: w, aboveContent: T, className: E, tabsNode: D, sidePanel: O, sidePanelVariant: k = "card", sidePanelStickyTop: A, layoutVariant: j, headerDensity: M = "default", presentation: N = "framed", bodyScrollMode: P = "contained", contentClassName: F, headerSupplementNode: I } = u, L = P === "contained", R = O != null, z = "single";
	R && (z = "split");
	let B = j ?? z;
	R || (B = "single");
	let V = B === "split", H = m;
	V && (H = e(h, g));
	let U;
	U = "headerNode" in u ? u.headerNode : /* @__PURE__ */ S(t, { ...u.header });
	let W = A?.trim(), G;
	W != null && W !== "" && (G = { [b]: W });
	let K = v;
	k === "plain" && (K = y);
	let q = e(_, K), J = D != null, Y = I != null, X = l({
		scrollMode: P,
		tabs: J,
		supplement: Y
	}), Z = null, Q = o;
	L && (Z = c, Q = a);
	let $ = f[M];
	return N === "framed" && ($ = p[M]), /* @__PURE__ */ C("div", {
		className: e(s, X, Z, E),
		"data-scroll-mode": P,
		"data-presentation": N,
		"data-layout-variant": B,
		style: G,
		children: [
			/* @__PURE__ */ S("div", {
				className: e(H, x),
				children: /* @__PURE__ */ S("div", {
					className: e(d, $),
					"data-detail-template-slot": "header",
					children: U
				})
			}),
			Y && /* @__PURE__ */ S("div", {
				className: e(H, "eno74pj txvbqbu86"),
				children: /* @__PURE__ */ S("div", {
					className: "eno74pr txvbqbfpn txvbqbh4x txvbqbheb txvbqbv7x",
					"data-detail-template-slot": "header-supplement",
					children: I
				})
			}),
			J && /* @__PURE__ */ S("div", {
				className: e(H, "eno74pj txvbqbu86"),
				children: /* @__PURE__ */ S("div", {
					className: "eno74p12 eno74p11 txvbqb13ix txvbqb1b87 txvbqbxtt txvbqb1asq",
					"data-detail-template-slot": "tabs",
					children: D
				})
			}),
			/* @__PURE__ */ S("div", {
				className: e(i, Q),
				"data-detail-template-slot": "body-viewport",
				children: /* @__PURE__ */ C("div", {
					className: e(H, r),
					children: [/* @__PURE__ */ C("div", {
						className: e(n, F),
						"data-detail-template-slot": "content",
						children: [T, w]
					}), R && /* @__PURE__ */ S("aside", {
						className: q,
						"data-detail-template-slot": "side-panel",
						"data-side-panel-variant": k,
						children: O
					})]
				})
			})
		]
	});
}, T = ({ children: t, className: n, withBaseStyles: r = !0, ...i }) => {
	let a;
	return r ? a = e(u, n) : n != null && (a = n), /* @__PURE__ */ S("div", {
		...i,
		className: a,
		children: t
	});
};
//#endregion
export { w as DetailPageTemplate, w as default, T as DetailPageTemplateContent };

//# sourceMappingURL=DetailPageTemplate.js.map