import { colors as colors$1 } from "../../../utilities/style/colors.mjs";
import { Token } from "./Token.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles } from "@material-ui/core";
import { CalendarIcon, OpenInNewTabIcon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/components/dataDisplay/Sticky.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "inline-flex",
		alignItems: "center",
		background: (props) => {
			if (colors$1.unity.hasOwnProperty(props.color)) return colors$1.unity[props.color].hint;
			else return colors$1.unity.info.hint;
		},
		borderRadius: (props) => props.size === "large" ? 56 / 2 : 48 / 2,
		margin: theme.spacing(1)
	},
	stickyChild: { display: "inline-table" }
}), { name: "FluentListItem" });
const Sticky = (props) => {
	const $ = c(17);
	const classes = useStyles(props);
	const { text, size, color } = props;
	const typographyVariant = size === "large" ? "body2" : "body1";
	let t0;
	if ($[0] !== classes.stickyChild || $[1] !== color || $[2] !== size) {
		t0 = /* @__PURE__ */ React.createElement(Token, {
			className: classes.stickyChild,
			icon: CalendarIcon,
			size,
			color
		});
		$[0] = classes.stickyChild;
		$[1] = color;
		$[2] = size;
		$[3] = t0;
	} else t0 = $[3];
	const t1 = text ?? "";
	let t2;
	if ($[4] !== classes.stickyChild || $[5] !== t1 || $[6] !== typographyVariant) {
		t2 = /* @__PURE__ */ React.createElement(Typography, {
			className: classes.stickyChild,
			variant: typographyVariant
		}, t1);
		$[4] = classes.stickyChild;
		$[5] = t1;
		$[6] = typographyVariant;
		$[7] = t2;
	} else t2 = $[7];
	let t3;
	if ($[8] !== classes.stickyChild || $[9] !== color || $[10] !== size) {
		t3 = /* @__PURE__ */ React.createElement(Token, {
			className: classes.stickyChild,
			icon: OpenInNewTabIcon,
			variant: "filled",
			size,
			color
		});
		$[8] = classes.stickyChild;
		$[9] = color;
		$[10] = size;
		$[11] = t3;
	} else t3 = $[11];
	let t4;
	if ($[12] !== classes.root || $[13] !== t0 || $[14] !== t2 || $[15] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t0, t2, t3);
		$[12] = classes.root;
		$[13] = t0;
		$[14] = t2;
		$[15] = t3;
		$[16] = t4;
	} else t4 = $[16];
	return t4;
};
Sticky.propTypes = {
	text: PropTypes.string,
	size: PropTypes.string,
	color: PropTypes.string
};
//#endregion
export { Sticky };

//# sourceMappingURL=Sticky.mjs.map