import { cx as e } from "../../theme/tools.js";
import { actionCluster as t, actionClusterItem as n, body as r, bottomFloatArea as i, bottomFloatContent as a, inner as o, metaRow as s, section as c, subheader as l, title as u } from "./ContentLayout.css.js";
import { jsx as d, jsxs as f } from "react/jsx-runtime";
//#region src/components/layout/ContentLayout.tsx
var p = 320, m = 48, h = (e, t) => e == null ? null : d(typeof e == "string" || typeof e == "number" ? "h1" : "div", {
	className: t,
	children: e
}), g = (e, t) => e == null ? null : d(typeof e == "string" || typeof e == "number" ? "p" : "div", {
	className: t,
	children: e
}), _ = (_) => {
	let { bottomFloat: v, classes: y, children: b, className: x, contentClassName: S, mainAction: C, meta: w, secondaryActions: T = [], subheader: E, title: D } = _, O = 0;
	if (v != null) {
		let e = v.reservedHeight ?? p;
		O = Math.max(e, 0);
	}
	let k;
	O > 0 && (k = { paddingBottom: O + m });
	let A = C != null || T.length > 0, j = null;
	C != null && (j = /* @__PURE__ */ d("div", {
		className: e(n, y?.actionClusterItem),
		children: C
	}));
	let M = null;
	v != null && (M = /* @__PURE__ */ d("div", {
		className: e(i, y?.bottomFloatArea),
		children: /* @__PURE__ */ d("div", {
			className: e(a, y?.bottomFloatContent),
			children: v.node
		})
	}));
	let N = null;
	A && (N = /* @__PURE__ */ f("div", {
		className: e(t, y?.actionCluster),
		children: [T.map((t, r) => /* @__PURE__ */ d("div", {
			className: e(n, y?.actionClusterItem),
			children: t
		}, `secondary-${r}`)), j]
	}));
	let P = e(u, y?.title), F = e(l, y?.subheader), I = e(s, y?.metaRow), L = null;
	return w != null && (L = /* @__PURE__ */ d("div", {
		className: I,
		children: w
	})), /* @__PURE__ */ f("section", {
		className: e(c, y?.section, x),
		style: k,
		children: [/* @__PURE__ */ f("div", {
			className: e(o, y?.inner, S),
			children: [(D != null || E != null || w != null || A) && /* @__PURE__ */ f("div", {
				className: e("_17ichq72 txvbqbfpn txvbqbh7g txvbqbheb txvbqbel txvbqblt7", y?.header),
				children: [/* @__PURE__ */ f("div", {
					className: e("_17ichq73 txvbqbfpn txvbqbh4x txvbqbhd8 txvbqbv7x", y?.headingGroup),
					children: [
						h(D, P),
						g(E, F),
						L
					]
				}), N]
			}), /* @__PURE__ */ d("div", {
				className: e(r, y?.body),
				children: b
			})]
		}), M]
	});
};
//#endregion
export { _ as ContentLayout };

//# sourceMappingURL=ContentLayout.js.map