import { c } from "react-compiler-runtime";
import React, { Children, cloneElement } from "react";
import { Divider, makeStyles } from "@material-ui/core";
import clsx from "clsx";
//#region src/UI/dataDisplay/entityHeader/ui/EntityHeaderStatList.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		flexWrap: "wrap",
		"& > *": { marginLeft: 1 }
	},
	rootFlexGrow: { flexGrow: 1 }
}));
const EntityHeaderStatList = (props) => {
	const $ = c(7);
	const { children, showSeperator, flexGrow: t0 } = props;
	const flexGrow = t0 === void 0 ? false : t0;
	const arrayChildren = Children.toArray(children);
	const classes = useStyles(props);
	let t1;
	if ($[0] !== classes.root || $[1] !== classes.rootFlexGrow || $[2] !== flexGrow) {
		t1 = clsx({
			[classes.root]: true,
			[classes.rootFlexGrow]: flexGrow
		});
		$[0] = classes.root;
		$[1] = classes.rootFlexGrow;
		$[2] = flexGrow;
		$[3] = t1;
	} else t1 = $[3];
	const t2 = Children.map(arrayChildren, (child, index) => {
		const isLast = index === arrayChildren.length - 1;
		return /* @__PURE__ */ React.createElement(React.Fragment, null, cloneElement(child, { isLast }), !isLast && showSeperator && /* @__PURE__ */ React.createElement(Divider, {
			orientation: "vertical",
			flexItem: true
		}));
	});
	let t3;
	if ($[4] !== t1 || $[5] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: t1 }, t2);
		$[4] = t1;
		$[5] = t2;
		$[6] = t3;
	} else t3 = $[6];
	return t3;
};
//#endregion
export { EntityHeaderStatList };

//# sourceMappingURL=EntityHeaderStatList.mjs.map