import { c } from "react-compiler-runtime";
import React, { Children, useEffect, useState } from "react";
import { lighten, makeStyles } from "@material-ui/core";
import clsx from "clsx";
//#region src/layout/GridRow.jsx
const useStyles = makeStyles((theme) => ({ root: {
	display: "flex",
	background: (highlight) => highlight === true && lighten("#40c4ff", .9),
	[theme.breakpoints.down("xs")]: { flexDirection: "column" }
} }));
const GridRow = (t0) => {
	const $ = c(11);
	const { children, highlight, className } = t0;
	const classes = useStyles(highlight);
	const [childCount, setChildCount] = useState();
	let t1;
	if ($[0] !== children) {
		t1 = () => {
			setChildCount(Children.count(children));
		};
		$[0] = children;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== childCount || $[3] !== children) {
		t2 = [childCount, children];
		$[2] = childCount;
		$[3] = children;
		$[4] = t2;
	} else t2 = $[4];
	useEffect(t1, t2);
	let t3;
	if ($[5] !== className || $[6] !== classes.root) {
		t3 = clsx(classes.root, className);
		$[5] = className;
		$[6] = classes.root;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== children || $[9] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: t3 }, children);
		$[8] = children;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	return t4;
};
//#endregion
export { GridRow };

//# sourceMappingURL=GridRow.mjs.map