import { FluentIcon } from "../../../utilities/iconLibrary/FluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React, { forwardRef } from "react";
import { ListItemIcon, ListItemText, MenuItem, makeStyles } from "@material-ui/core";
//#region src/UI/widgets/FluentComponents/FUIMenuItem.jsx
const useStyles = makeStyles({ listItemIcon: { minWidth: 32 } }, { name: "FUIMenuItem" });
/**
* <MenuItem> with icon support
*/
const FUIMenuItem = (props, ref) => {
	const $ = c(20);
	const classes = useStyles();
	let fluentIcon;
	let icon;
	let menuItemProps;
	let primary;
	let secondary;
	if ($[0] !== props) {
		({icon, fluentIcon, primary, secondary, ...menuItemProps} = props);
		$[0] = props;
		$[1] = fluentIcon;
		$[2] = icon;
		$[3] = menuItemProps;
		$[4] = primary;
		$[5] = secondary;
	} else {
		fluentIcon = $[1];
		icon = $[2];
		menuItemProps = $[3];
		primary = $[4];
		secondary = $[5];
	}
	let t0;
	if ($[6] !== fluentIcon || $[7] !== icon) {
		t0 = icon || /* @__PURE__ */ React.createElement(FluentIcon, { component: fluentIcon });
		$[6] = fluentIcon;
		$[7] = icon;
		$[8] = t0;
	} else t0 = $[8];
	let t1;
	if ($[9] !== classes.listItemIcon || $[10] !== t0) {
		t1 = /* @__PURE__ */ React.createElement(ListItemIcon, { className: classes.listItemIcon }, t0);
		$[9] = classes.listItemIcon;
		$[10] = t0;
		$[11] = t1;
	} else t1 = $[11];
	let t2;
	if ($[12] !== primary || $[13] !== secondary) {
		t2 = /* @__PURE__ */ React.createElement(ListItemText, {
			primary,
			secondary
		});
		$[12] = primary;
		$[13] = secondary;
		$[14] = t2;
	} else t2 = $[14];
	let t3;
	if ($[15] !== menuItemProps || $[16] !== ref || $[17] !== t1 || $[18] !== t2) {
		t3 = /* @__PURE__ */ React.createElement(MenuItem, {
			ref,
			dense: true,
			...menuItemProps
		}, t1, t2);
		$[15] = menuItemProps;
		$[16] = ref;
		$[17] = t1;
		$[18] = t2;
		$[19] = t3;
	} else t3 = $[19];
	return t3;
};
var FUIMenuItem_default = forwardRef(FUIMenuItem);
//#endregion
export { FUIMenuItem_default as default };

//# sourceMappingURL=FUIMenuItem.mjs.map