import { StatusChip } from "../UI/dataDisplay/status/StatusChip.mjs";
import { ItemDescription } from "./ItemDescription.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
//#region src/inquiry/AmbientListItem.jsx
const useStyles = makeStyles((theme) => ({
	headerRoot: {
		display: "flex",
		flexDirection: "row",
		justifyContent: "space-between",
		alignItems: "center",
		boxSizing: "border-box",
		height: theme.spacing(5),
		borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
		flexGrow: "0",
		paddingRight: theme.spacing(2),
		gap: theme.spacing(1.5),
		background: (props) => props?.Alert?.toLowerCase() === "true" ? props?.style?.background ? props?.style?.background : "#FDF7F6" : theme.palette.background.paper
	},
	labelText: {
		fontWeight: "inherit",
		flexGrow: 1,
		lineHeight: "1.25rem"
	},
	labelOverflow: {
		whiteSpace: "nowrap",
		overflow: "hidden",
		textOverflow: "ellipsis"
	}
}));
/**
* `AmbientListItem` component
*/
const AmbientListItem = (props) => {
	const $ = c(15);
	const { dataList: t0, paid, paidLabel: t1, handleClick, style: t2 } = props;
	let t3;
	if ($[0] !== t0) {
		t3 = t0 === void 0 ? [] : t0;
		$[0] = t0;
		$[1] = t3;
	} else t3 = $[1];
	const dataList = t3;
	const paidLabel = t1 === void 0 ? "none" : t1;
	let t4;
	if ($[2] !== t2) {
		t4 = t2 === void 0 ? {} : t2;
		$[2] = t2;
		$[3] = t4;
	} else t4 = $[3];
	const style = t4;
	const classes = useStyles(props);
	let t5;
	if ($[4] !== dataList) {
		t5 = dataList?.map(_temp);
		$[4] = dataList;
		$[5] = t5;
	} else t5 = $[5];
	let t6;
	if ($[6] !== handleClick || $[7] !== paid || $[8] !== paidLabel) {
		t6 = paid?.toLowerCase() === "true" && /* @__PURE__ */ React.createElement(StatusChip, {
			status: "success",
			label: paidLabel,
			onClick: handleClick
		});
		$[6] = handleClick;
		$[7] = paid;
		$[8] = paidLabel;
		$[9] = t6;
	} else t6 = $[9];
	let t7;
	if ($[10] !== classes.headerRoot || $[11] !== style || $[12] !== t5 || $[13] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", {
			className: classes.headerRoot,
			style
		}, t5, t6);
		$[10] = classes.headerRoot;
		$[11] = style;
		$[12] = t5;
		$[13] = t6;
		$[14] = t7;
	} else t7 = $[14];
	return t7;
};
function _temp(data, index) {
	return /* @__PURE__ */ React.createElement(ItemDescription, {
		key: `${data.id}${index}`,
		iconName: data?.icon,
		label: data?.label,
		style: data?.style
	});
}
//#endregion
export { AmbientListItem };

//# sourceMappingURL=AmbientListItem.mjs.map