import { UnityFluentIcon } from "../utilities/iconLibrary/UnityFluentIcon.mjs";
import { fluentLibraryIcons } from "../assets/unityIcons/LibraryData.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles, useTheme } from "@material-ui/core";
//#region src/inquiry/ItemDescription.jsx
const useStyles = makeStyles((theme) => ({
	labelRoot: {
		display: "flex",
		alignItems: "center"
	},
	labelText: {
		fontWeight: "inherit",
		flexGrow: 1,
		lineHeight: "1.25rem"
	},
	iconContainer: {
		display: "flex",
		alignItems: "flex-start",
		justifyContent: "center",
		width: theme.spacing(4)
	},
	labelContainer: { width: `calc(100% - ${theme.spacing(1)}px)` }
}));
/**
* `ItemDescription` component
*/
const ItemDescription = (props) => {
	const $ = c(24);
	const { iconName: t0, label, iconSize: t1, iconType: t2, iconColor: t3, variant: t4, style: t5 } = props;
	const iconName = t0 === void 0 ? "none" : t0;
	const iconSize = t1 === void 0 ? "medium" : t1;
	const iconType = t2 === void 0 ? "" : t2;
	const iconColor = t3 === void 0 ? "" : t3;
	const variant = t4 === void 0 ? "caption" : t4;
	let t6;
	if ($[0] !== t5) {
		t6 = t5 === void 0 ? {} : t5;
		$[0] = t5;
		$[1] = t6;
	} else t6 = $[1];
	const style = t6;
	const theme = useTheme();
	const classes = useStyles(props);
	let t7;
	bb0: {
		if (!iconName || iconName === "none") {
			t7 = null;
			break bb0;
		}
		let t8;
		if ($[2] !== iconName) {
			t8 = fluentLibraryIcons.find((item) => item.id.toLowerCase().includes(iconName.toLowerCase()));
			$[2] = iconName;
			$[3] = t8;
		} else t8 = $[3];
		t7 = t8?.icon || null;
	}
	const IconComponent = t7;
	let t8;
	if ($[4] !== IconComponent || $[5] !== classes.iconContainer || $[6] !== iconColor || $[7] !== iconSize || $[8] !== iconType || $[9] !== style || $[10] !== theme) {
		t8 = IconComponent && /* @__PURE__ */ React.createElement("div", { className: classes.iconContainer }, /* @__PURE__ */ React.createElement(UnityFluentIcon, {
			size: iconSize,
			color: iconColor || theme.palette.primary.main,
			type: iconType,
			icon: IconComponent,
			styles: {
				color: iconColor,
				...style
			}
		}));
		$[4] = IconComponent;
		$[5] = classes.iconContainer;
		$[6] = iconColor;
		$[7] = iconSize;
		$[8] = iconType;
		$[9] = style;
		$[10] = theme;
		$[11] = t8;
	} else t8 = $[11];
	let t9;
	if ($[12] !== classes.labelText || $[13] !== label || $[14] !== style || $[15] !== variant) {
		t9 = /* @__PURE__ */ React.createElement(Typography, {
			variant,
			className: classes.labelText,
			style
		}, label);
		$[12] = classes.labelText;
		$[13] = label;
		$[14] = style;
		$[15] = variant;
		$[16] = t9;
	} else t9 = $[16];
	let t10;
	if ($[17] !== classes.labelContainer || $[18] !== t9) {
		t10 = /* @__PURE__ */ React.createElement("div", { className: classes.labelContainer }, t9);
		$[17] = classes.labelContainer;
		$[18] = t9;
		$[19] = t10;
	} else t10 = $[19];
	let t11;
	if ($[20] !== classes.labelRoot || $[21] !== t10 || $[22] !== t8) {
		t11 = /* @__PURE__ */ React.createElement("div", { className: classes.labelRoot }, t8, t10);
		$[20] = classes.labelRoot;
		$[21] = t10;
		$[22] = t8;
		$[23] = t11;
	} else t11 = $[23];
	return t11;
};
//#endregion
export { ItemDescription };

//# sourceMappingURL=ItemDescription.mjs.map