import { UnityFluentIcon } from "../utilities/iconLibrary/UnityFluentIcon.mjs";
import { LayoutUnit } from "../layout/LayoutUnit.mjs";
import { useFluentIcon } from "../hooks/useFluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles, useTheme } from "@material-ui/core";
import clsx from "clsx";
//#region src/inquiry/AlertFlag.jsx
const useStyles = makeStyles((theme) => ({
	labelRoot: {
		display: "flex",
		alignItems: "center",
		flexDirection: "column"
	},
	labelText: {
		fontWeight: "inherit",
		flexGrow: 1,
		lineHeight: "1.25rem"
	},
	iconContainer: {
		display: "flex",
		alignItems: "center",
		justifyContent: "center",
		flexDirection: "column",
		marginTop: theme.spacing(.5),
		width: theme.spacing(4),
		height: theme.spacing(4)
	},
	labelOverflow: {
		whiteSpace: "nowrap",
		overflow: "hidden",
		textOverflow: "ellipsis"
	},
	iconsContainer: {
		display: "flex",
		alignItems: "flex-start",
		justifyContent: "center",
		gap: theme.spacing(.75)
	}
}));
/**
* `AlertFlag` component
*/
const AlertFlag = (props) => {
	const $ = c(31);
	const { iconName: t0, secondaryIconName: t1, secondaryIconColor: t2, link: t3, label, iconSize: t4, iconType: t5, iconColor: t6, variant: t7, style: t8 } = props;
	const iconName = t0 === void 0 ? "none" : t0;
	const secondaryIconName = t1 === void 0 ? "none" : t1;
	const secondaryIconColor = t2 === void 0 ? "#008383" : t2;
	const link = t3 === void 0 ? false : t3;
	const iconSize = t4 === void 0 ? "medium" : t4;
	const iconType = t5 === void 0 ? "" : t5;
	const iconColor = t6 === void 0 ? "" : t6;
	const variant = t7 === void 0 ? "caption" : t7;
	let t9;
	if ($[0] !== t8) {
		t9 = t8 === void 0 ? {} : t8;
		$[0] = t8;
		$[1] = t9;
	} else t9 = $[1];
	const style = t9;
	const theme = useTheme();
	const classes = useStyles(props);
	const { icon: IconComponent } = useFluentIcon(iconName);
	const { icon: SubIconComponent } = useFluentIcon(secondaryIconName);
	const t10 = classes.labelRoot;
	let t11;
	if ($[2] !== IconComponent || $[3] !== iconColor || $[4] !== iconSize || $[5] !== iconType || $[6] !== style || $[7] !== theme) {
		t11 = IconComponent && /* @__PURE__ */ React.createElement(UnityFluentIcon, {
			color: iconColor || theme.palette.primary.main,
			type: iconType,
			icon: IconComponent,
			customSize: true,
			size: iconSize,
			styles: {
				color: iconColor,
				...style
			}
		});
		$[2] = IconComponent;
		$[3] = iconColor;
		$[4] = iconSize;
		$[5] = iconType;
		$[6] = style;
		$[7] = theme;
		$[8] = t11;
	} else t11 = $[8];
	let t12;
	if ($[9] !== SubIconComponent || $[10] !== link || $[11] !== secondaryIconColor || $[12] !== theme) {
		t12 = link && SubIconComponent && /* @__PURE__ */ React.createElement(UnityFluentIcon, {
			size: "small",
			color: secondaryIconColor,
			icon: SubIconComponent || "",
			style: {
				color: secondaryIconColor,
				marginTop: theme.spacing(.4)
			}
		});
		$[9] = SubIconComponent;
		$[10] = link;
		$[11] = secondaryIconColor;
		$[12] = theme;
		$[13] = t12;
	} else t12 = $[13];
	let t13;
	if ($[14] !== classes.iconsContainer || $[15] !== t11 || $[16] !== t12) {
		t13 = /* @__PURE__ */ React.createElement("div", { className: classes.iconsContainer }, t11, t12);
		$[14] = classes.iconsContainer;
		$[15] = t11;
		$[16] = t12;
		$[17] = t13;
	} else t13 = $[17];
	let t14;
	if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "nudge" });
		$[18] = t14;
	} else t14 = $[18];
	let t15;
	if ($[19] !== classes.labelOverflow || $[20] !== classes.labelText) {
		t15 = clsx(classes.labelText, classes.labelOverflow);
		$[19] = classes.labelOverflow;
		$[20] = classes.labelText;
		$[21] = t15;
	} else t15 = $[21];
	let t16;
	if ($[22] !== label || $[23] !== style || $[24] !== t15 || $[25] !== variant) {
		t16 = /* @__PURE__ */ React.createElement(Typography, {
			variant,
			className: t15,
			style
		}, label);
		$[22] = label;
		$[23] = style;
		$[24] = t15;
		$[25] = variant;
		$[26] = t16;
	} else t16 = $[26];
	let t17;
	if ($[27] !== classes.labelRoot || $[28] !== t13 || $[29] !== t16) {
		t17 = /* @__PURE__ */ React.createElement("div", { className: t10 }, t13, t14, t16);
		$[27] = classes.labelRoot;
		$[28] = t13;
		$[29] = t16;
		$[30] = t17;
	} else t17 = $[30];
	return t17;
};
//#endregion
export { AlertFlag };

//# sourceMappingURL=AlertFlag.mjs.map