import { FluentIcon } from "../../../utilities/iconLibrary/FluentIcon.mjs";
import { UnityFluentIcon } from "../../../utilities/iconLibrary/UnityFluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React, { memo } from "react";
import { ButtonBase, Paper, Tooltip, makeStyles } from "@material-ui/core";
//#region src/UI/dataDisplay/map/FluentIconKey.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		width: 10,
		height: 10,
		paddingTop: theme.spacing(2.5),
		paddingBottom: theme.spacing(5.5),
		paddingLeft: theme.spacing(3.5),
		paddingRight: theme.spacing(5.5),
		margin: theme.spacing(.25),
		cursor: "pointer",
		"&:hover": { boxShadow: theme.shadows[1] }
	},
	images: {
		height: theme.spacing(2.25),
		width: theme.spacing(2.25)
	}
}));
const IconKey = (props) => {
	const $ = c(12);
	const classes = useStyles();
	const { icon, select, tooltip, iconType } = props;
	let t0;
	if ($[0] !== icon || $[1] !== iconType) {
		t0 = /* @__PURE__ */ React.createElement("div", null, iconType === "unity" ? /* @__PURE__ */ React.createElement(UnityFluentIcon, { component: icon }) : /* @__PURE__ */ React.createElement(FluentIcon, { component: icon }));
		$[0] = icon;
		$[1] = iconType;
		$[2] = t0;
	} else t0 = $[2];
	let t1;
	if ($[3] !== classes.root || $[4] !== t0) {
		t1 = /* @__PURE__ */ React.createElement(Paper, {
			elevation: 0,
			square: true,
			className: classes.root,
			variant: "outlined"
		}, t0);
		$[3] = classes.root;
		$[4] = t0;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== t1 || $[7] !== tooltip) {
		t2 = /* @__PURE__ */ React.createElement(Tooltip, {
			title: tooltip,
			placement: "top"
		}, t1);
		$[6] = t1;
		$[7] = tooltip;
		$[8] = t2;
	} else t2 = $[8];
	let t3;
	if ($[9] !== select || $[10] !== t2) {
		t3 = /* @__PURE__ */ React.createElement(ButtonBase, { onClick: select }, t2);
		$[9] = select;
		$[10] = t2;
		$[11] = t3;
	} else t3 = $[11];
	return t3;
};
var FluentIconKey_default = memo(IconKey);
//#endregion
export { FluentIconKey_default as default };

//# sourceMappingURL=FluentIconKey.mjs.map