import { ExtenderToggle } from "./ui/ExtenderToggle.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/UI/templates/ToggleSection.jsx
const useStyles = makeStyles((theme) => ({
	root: { width: "100%" },
	container: {
		padding: (props) => props.open ? theme.spacing(1) : theme.spacing(.25),
		parddingRight: theme.spacing(1),
		parddingleft: theme.spacing(1),
		background: (props) => props.color
	},
	lowerShelf: { display: "flex" },
	shelfOptions: {
		flex: 1,
		width: "100%"
	}
}));
const ToggleSection = (props) => {
	const $ = c(19);
	const classes = useStyles(props);
	const { children, onClick, sectionOpen, options, toggleLabel, color } = props;
	let t0;
	if ($[0] !== children || $[1] !== classes.container) {
		t0 = /* @__PURE__ */ React.createElement("div", { className: classes.container }, " ", children, " ");
		$[0] = children;
		$[1] = classes.container;
		$[2] = t0;
	} else t0 = $[2];
	let t1;
	if ($[3] !== classes.shelfOptions || $[4] !== options) {
		t1 = /* @__PURE__ */ React.createElement("div", { className: classes.shelfOptions }, options);
		$[3] = classes.shelfOptions;
		$[4] = options;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== color || $[7] !== onClick || $[8] !== sectionOpen || $[9] !== toggleLabel) {
		t2 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(ExtenderToggle, {
			onClick,
			open: sectionOpen,
			toggleLabel,
			color
		}));
		$[6] = color;
		$[7] = onClick;
		$[8] = sectionOpen;
		$[9] = toggleLabel;
		$[10] = t2;
	} else t2 = $[10];
	let t3;
	if ($[11] !== classes.lowerShelf || $[12] !== t1 || $[13] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.lowerShelf }, t1, t2);
		$[11] = classes.lowerShelf;
		$[12] = t1;
		$[13] = t2;
		$[14] = t3;
	} else t3 = $[14];
	let t4;
	if ($[15] !== classes.root || $[16] !== t0 || $[17] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t0, t3);
		$[15] = classes.root;
		$[16] = t0;
		$[17] = t3;
		$[18] = t4;
	} else t4 = $[18];
	return t4;
};
ToggleSection.propTypes = {
	children: PropTypes.node,
	onClick: PropTypes.func,
	sectionOpen: PropTypes.bool,
	options: PropTypes.node,
	toggleLabel: PropTypes.node,
	color: PropTypes.string
};
//#endregion
export { ToggleSection };

//# sourceMappingURL=ToggleSection.mjs.map