import { FluentIconButton } from "../../UI/inputs/buttons/FluentIconButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Paper, makeStyles } from "@material-ui/core";
import clsx from "clsx";
import { ChevronLeftIcon, ChevronRightIcon } from "@fluentui/react-icons";
//#region src/map-library/ui/MapSheet.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		position: "absolute",
		zIndex: 9999,
		top: 50,
		right: 0
	},
	mapPage: { overflow: "hidden" },
	collapsed: {
		width: 0,
		transition: theme.transitions.create("width", {
			easing: theme.transitions.easing.easeOut,
			duration: theme.transitions.duration.leavingScreen
		})
	},
	expanded: {
		width: 300,
		transition: theme.transitions.create("width", {
			easing: theme.transitions.easing.easeIn,
			duration: theme.transitions.duration.enteringScreen
		})
	},
	wrapper: { padding: theme.spacing(2) },
	sheetWrapper: {
		display: "flex",
		flexDirection: "row"
	},
	toggle: {
		padding: theme.spacing(1),
		background: theme.palette.common.white,
		height: theme.spacing(6)
	}
}));
const MapSheet = (props) => {
	const $ = c(20);
	const classes = useStyles();
	const { children, collapsed, toggle } = props;
	const t0 = collapsed ? classes.collapsed : classes.expanded;
	let t1;
	if ($[0] !== classes.root || $[1] !== t0) {
		t1 = clsx(classes.root, t0);
		$[0] = classes.root;
		$[1] = t0;
		$[2] = t1;
	} else t1 = $[2];
	const t2 = collapsed ? ChevronLeftIcon : ChevronRightIcon;
	let t3;
	if ($[3] !== classes.extendedButton || $[4] !== t2 || $[5] !== toggle) {
		t3 = /* @__PURE__ */ React.createElement(FluentIconButton, {
			className: classes.extendedButton,
			onClick: toggle,
			color: "primary",
			icon: t2
		});
		$[3] = classes.extendedButton;
		$[4] = t2;
		$[5] = toggle;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== classes.toggle || $[8] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.toggle }, t3);
		$[7] = classes.toggle;
		$[8] = t3;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== children || $[11] !== classes.wrapper) {
		t5 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Paper, { square: true }, /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, children)));
		$[10] = children;
		$[11] = classes.wrapper;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[13] !== classes.sheetWrapper || $[14] !== t4 || $[15] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: classes.sheetWrapper }, t4, t5);
		$[13] = classes.sheetWrapper;
		$[14] = t4;
		$[15] = t5;
		$[16] = t6;
	} else t6 = $[16];
	let t7;
	if ($[17] !== t1 || $[18] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: t1 }, t6);
		$[17] = t1;
		$[18] = t6;
		$[19] = t7;
	} else t7 = $[19];
	return t7;
};
//#endregion
export { MapSheet };

//# sourceMappingURL=MapSheet.mjs.map