import { getRatio } from "./getRatio.mjs";
import { GridRow } from "./GridRow.mjs";
import { GridUnit } from "./GridUnit.mjs";
import { c } from "react-compiler-runtime";
import React, { Children } from "react";
import { useTheme } from "@material-ui/core";
//#region src/layout/GridGroup.jsx
const GridGroup = (t0) => {
	const $ = c(58);
	const { col1, col2, col3, col4, col5, col6, ratio, highlight } = t0;
	const theme = useTheme();
	let t1;
	if ($[0] !== col1) {
		t1 = Children.toArray(col1);
		$[0] = col1;
		$[1] = t1;
	} else t1 = $[1];
	const cnt = t1.length;
	let t2;
	if ($[2] !== col2) {
		t2 = Children.toArray(col2);
		$[2] = col2;
		$[3] = t2;
	} else t2 = $[3];
	const cnt2 = t2.length;
	let t3;
	if ($[4] !== col3) {
		t3 = Children.toArray(col3);
		$[4] = col3;
		$[5] = t3;
	} else t3 = $[5];
	const cnt3 = t3.length;
	let t4;
	if ($[6] !== col4) {
		t4 = Children.toArray(col4);
		$[6] = col4;
		$[7] = t4;
	} else t4 = $[7];
	const cnt4 = t4.length;
	let t5;
	if ($[8] !== col5) {
		t5 = Children.toArray(col5);
		$[8] = col5;
		$[9] = t5;
	} else t5 = $[9];
	const cnt5 = t5.length;
	let t6;
	if ($[10] !== col6) {
		t6 = Children.toArray(col6);
		$[10] = col6;
		$[11] = t6;
	} else t6 = $[11];
	const cnt6 = t6.length;
	const number = cnt + cnt2 + cnt3 + cnt4 + cnt5 + cnt6;
	const width = theme.spacing(154) / number / 8;
	let t7;
	if ($[12] !== ratio) {
		t7 = getRatio(ratio);
		$[12] = ratio;
		$[13] = t7;
	} else t7 = $[13];
	const ratioArr = t7;
	let t8;
	if ($[14] !== col1 || $[15] !== number || $[16] !== ratioArr || $[17] !== theme || $[18] !== width) {
		t8 = number >= 1 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col1);
		$[14] = col1;
		$[15] = number;
		$[16] = ratioArr;
		$[17] = theme;
		$[18] = width;
		$[19] = t8;
	} else t8 = $[19];
	let t9;
	if ($[20] !== col2 || $[21] !== number || $[22] !== ratioArr || $[23] !== theme || $[24] !== width) {
		t9 = number >= 2 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col2);
		$[20] = col2;
		$[21] = number;
		$[22] = ratioArr;
		$[23] = theme;
		$[24] = width;
		$[25] = t9;
	} else t9 = $[25];
	let t10;
	if ($[26] !== col3 || $[27] !== number || $[28] !== ratioArr || $[29] !== theme || $[30] !== width) {
		t10 = number >= 3 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col3);
		$[26] = col3;
		$[27] = number;
		$[28] = ratioArr;
		$[29] = theme;
		$[30] = width;
		$[31] = t10;
	} else t10 = $[31];
	let t11;
	if ($[32] !== col4 || $[33] !== number || $[34] !== ratioArr || $[35] !== theme || $[36] !== width) {
		t11 = number >= 4 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col4);
		$[32] = col4;
		$[33] = number;
		$[34] = ratioArr;
		$[35] = theme;
		$[36] = width;
		$[37] = t11;
	} else t11 = $[37];
	let t12;
	if ($[38] !== col5 || $[39] !== number || $[40] !== ratioArr || $[41] !== theme || $[42] !== width) {
		t12 = number >= 5 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col5);
		$[38] = col5;
		$[39] = number;
		$[40] = ratioArr;
		$[41] = theme;
		$[42] = width;
		$[43] = t12;
	} else t12 = $[43];
	let t13;
	if ($[44] !== col6 || $[45] !== number || $[46] !== ratioArr || $[47] !== theme || $[48] !== width) {
		t13 = number >= 6 && /* @__PURE__ */ React.createElement(GridUnit, {
			width: theme.spacing(width),
			columnPadding: 8 * number - 8,
			r1: ratioArr[0],
			r2: ratioArr[1]
		}, col6);
		$[44] = col6;
		$[45] = number;
		$[46] = ratioArr;
		$[47] = theme;
		$[48] = width;
		$[49] = t13;
	} else t13 = $[49];
	let t14;
	if ($[50] !== highlight || $[51] !== t10 || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t8 || $[56] !== t9) {
		const staticDisplay = /* @__PURE__ */ React.createElement(GridRow, { highlight }, t8, t9, t10, t11, t12, t13);
		t14 = /* @__PURE__ */ React.createElement("div", null, " ", staticDisplay, " ");
		$[50] = highlight;
		$[51] = t10;
		$[52] = t11;
		$[53] = t12;
		$[54] = t13;
		$[55] = t8;
		$[56] = t9;
		$[57] = t14;
	} else t14 = $[57];
	return t14;
};
//#endregion
export { GridGroup };

//# sourceMappingURL=GridGroup.mjs.map