import { LayoutUnit } from "../../../layout/LayoutUnit.mjs";
import { AmbientTokenButton } from "../../inputs/buttons/AmbientTokenButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles } from "@material-ui/core";
import { ChevronFold10Icon, ChevronUnfold10Icon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/templates/ui/GridGroupingHeader.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	actionHeader: {
		display: "flex",
		flexDirection: "row",
		gap: 10
	},
	icon: {
		background: theme.palette.common.white,
		padding: theme.spacing(1),
		color: theme.palette.secondary.main
	}
}));
const GridGroupingHeader = (t0) => {
	const $ = c(17);
	const { expandClick, collapseClick } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] !== collapseClick) {
		t1 = /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			icon: ChevronFold10Icon,
			tooltip: "Collapse All",
			ariaLabel: "Collapse All",
			onClick: collapseClick
		});
		$[0] = collapseClick;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== expandClick) {
		t2 = /* @__PURE__ */ React.createElement(AmbientTokenButton, {
			icon: ChevronUnfold10Icon,
			tooltip: "Expand All",
			ariaLabel: "Expand All",
			onClick: expandClick
		});
		$[2] = expandClick;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== classes.actionHeader || $[5] !== t1 || $[6] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.actionHeader }, t1, t2);
		$[4] = classes.actionHeader;
		$[5] = t1;
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "nudge" });
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, "Group By:");
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== classes.label) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: classes.label }, t5);
		$[10] = classes.label;
		$[11] = t6;
	} else t6 = $[11];
	let t7;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "nudge" });
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== classes.root || $[14] !== t3 || $[15] !== t6) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t3, t4, t6, t7);
		$[13] = classes.root;
		$[14] = t3;
		$[15] = t6;
		$[16] = t8;
	} else t8 = $[16];
	return t8;
};
GridGroupingHeader.propTypes = {
	expandClick: PropTypes.func.isRequired,
	collapseClick: PropTypes.func.isRequired
};
//#endregion
export { GridGroupingHeader };

//# sourceMappingURL=GridGroupingHeader.mjs.map