import { FluentIcon } from "../../../../utilities/iconLibrary/FluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { IconButton, Tooltip, makeStyles } from "@material-ui/core";
import { ChevronRightIcon } from "@fluentui/react-icons";
//#region src/UI/surfaces/NestedGrid/ui/ExpandRenderer.jsx
const useStyles = makeStyles((theme) => ({ icon: { margin: theme.spacing(.5) } }));
const ExpandRenderer = (t0) => {
	const $ = c(10);
	const { openNestedGrid, title, icon } = t0;
	const classes = useStyles();
	const t1 = icon ? icon : ChevronRightIcon;
	let t2;
	if ($[0] !== t1) {
		t2 = /* @__PURE__ */ React.createElement(FluentIcon, { component: t1 });
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== classes.icon || $[3] !== openNestedGrid || $[4] !== t2 || $[5] !== title) {
		t3 = /* @__PURE__ */ React.createElement(IconButton, {
			"aria-label": title,
			className: classes.icon,
			size: "small",
			onClick: openNestedGrid
		}, t2);
		$[2] = classes.icon;
		$[3] = openNestedGrid;
		$[4] = t2;
		$[5] = title;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== t3 || $[8] !== title) {
		t4 = /* @__PURE__ */ React.createElement(Tooltip, { title }, t3);
		$[7] = t3;
		$[8] = title;
		$[9] = t4;
	} else t4 = $[9];
	return t4;
};
//#endregion
export { ExpandRenderer };

//# sourceMappingURL=ExpandRenderer.mjs.map