import { FluentIconButton } from "../../UI/inputs/buttons/FluentIconButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import clsx from "clsx";
import { ChevronRightIcon } from "@fluentui/react-icons";
import { useTranslation } from "react-i18next";
//#region src/shell/ui/SidebarCollapseButton.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		justifyContent: "flex-start",
		height: 48,
		width: "100%",
		paddingLeft: 0
	},
	iconButton: {
		width: 48,
		height: 48,
		marginLeft: 16 - 24 / 2
	},
	expanded: {},
	icon: {
		width: 14,
		height: 14,
		margin: 8 / 2,
		transition: theme?.transitions?.create("transform", {
			easing: theme?.transitions?.easing?.sharp,
			duration: theme?.transitions?.duration?.shortest
		}),
		"$expanded &": { transform: "scaleX(-1)" }
	},
	switch: {
		margin: 8 / 2,
		transition: theme?.transitions?.create("transform", {
			easing: theme?.transitions?.easing?.sharp,
			duration: theme?.transitions?.duration?.shortest
		}),
		"$expanded &": { transform: "scaleX(-1)" }
	}
}), { name: "SidebarCollapseButton" });
/**
* Custom styled button used for expanding/collapsing sidebars
*/
const SidebarCollapseButton = (props) => {
	const $ = c(26);
	const classes = useStyles(props);
	let className;
	let expanded;
	let id;
	let other;
	let udprecordid;
	if ($[0] !== props) {
		({expanded, className, id, udprecordid, ...other} = props);
		$[0] = props;
		$[1] = className;
		$[2] = expanded;
		$[3] = id;
		$[4] = other;
		$[5] = udprecordid;
	} else {
		className = $[1];
		expanded = $[2];
		id = $[3];
		other = $[4];
		udprecordid = $[5];
	}
	const { t } = useTranslation();
	let t0;
	if ($[6] !== className || $[7] !== classes.expanded || $[8] !== classes.root || $[9] !== expanded) {
		t0 = clsx(className, classes.root, { [classes.expanded]: expanded });
		$[6] = className;
		$[7] = classes.expanded;
		$[8] = classes.root;
		$[9] = expanded;
		$[10] = t0;
	} else t0 = $[10];
	let t1;
	if ($[11] !== classes.iconButton || $[12] !== classes.switch) {
		t1 = clsx(classes.iconButton, classes.switch);
		$[11] = classes.iconButton;
		$[12] = classes.switch;
		$[13] = t1;
	} else t1 = $[13];
	let t2;
	if ($[14] !== expanded || $[15] !== t) {
		t2 = expanded ? t("mainMenuAria.collapseNavigation") : t("mainMenuAria.expandNavigation");
		$[14] = expanded;
		$[15] = t;
		$[16] = t2;
	} else t2 = $[16];
	let t3;
	if ($[17] !== id || $[18] !== t1 || $[19] !== t2 || $[20] !== udprecordid) {
		t3 = /* @__PURE__ */ React.createElement(FluentIconButton, {
			id,
			udprecordid,
			color: "inherit",
			className: t1,
			"aria-label": t2,
			icon: ChevronRightIcon
		});
		$[17] = id;
		$[18] = t1;
		$[19] = t2;
		$[20] = udprecordid;
		$[21] = t3;
	} else t3 = $[21];
	let t4;
	if ($[22] !== other || $[23] !== t0 || $[24] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", {
			...other,
			className: t0
		}, t3);
		$[22] = other;
		$[23] = t0;
		$[24] = t3;
		$[25] = t4;
	} else t4 = $[25];
	return t4;
};
//#endregion
export { SidebarCollapseButton };

//# sourceMappingURL=SidebarCollapseButton.mjs.map