import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/UI/dataDisplay/map/ColorKey.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	itemKey: {
		width: theme.spacing(4),
		height: theme.spacing(.5),
		marginTop: theme.spacing(.5)
	},
	keyRoot: {
		display: "flex",
		justifyContent: "space-between",
		marginRight: theme.spacing(5),
		width: theme.spacing(10)
	}
}));
const ColorKey = (t0) => {
	const $ = c(11);
	const { label, color } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] !== label) {
		t1 = /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, label);
		$[0] = label;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== color) {
		t2 = { background: color };
		$[2] = color;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== classes.itemKey || $[5] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", {
			className: classes.itemKey,
			style: t2
		});
		$[4] = classes.itemKey;
		$[5] = t2;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== classes.keyRoot || $[8] !== t1 || $[9] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.keyRoot }, t1, t3);
		$[7] = classes.keyRoot;
		$[8] = t1;
		$[9] = t3;
		$[10] = t4;
	} else t4 = $[10];
	return t4;
};
ColorKey.propTypes = {
	label: PropTypes.string.isRequired,
	color: PropTypes.string.isRequired
};
//#endregion
export { ColorKey };

//# sourceMappingURL=ColorKey.mjs.map