import { useActionStore } from "../../../stores/actionStore.mjs";
import { UdpAlert } from "./UdpAlert.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
//#region src/UI/utilityDisplay/alerts/UdpAlertsContainer.jsx
const useStyles = makeStyles((theme) => ({
	root: { display: "flex" },
	alertContainer: { marginRight: theme.spacing(.5) }
}));
const UdpAlertsContainer = (props) => {
	const $ = c(9);
	const { alertList } = props;
	const classes = useStyles(props);
	const selectedNode = useActionStore(_temp);
	let t0;
	if ($[0] !== alertList || $[1] !== selectedNode?.properties?.alerts) {
		t0 = alertList || selectedNode?.properties?.alerts || [];
		$[0] = alertList;
		$[1] = selectedNode?.properties?.alerts;
		$[2] = t0;
	} else t0 = $[2];
	const alerts = t0;
	let t1;
	if ($[3] !== alerts || $[4] !== classes.alertContainer) {
		t1 = alerts?.map((alert, i) => /* @__PURE__ */ React.createElement("div", { className: alerts.length - 1 !== i ? classes.alertContainer : "" }, /* @__PURE__ */ React.createElement(UdpAlert, {
			key: alert?.id,
			alertId: alert.alertId
		})));
		$[3] = alerts;
		$[4] = classes.alertContainer;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== classes.root || $[7] !== t1) {
		t2 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t1);
		$[6] = classes.root;
		$[7] = t1;
		$[8] = t2;
	} else t2 = $[8];
	return t2;
};
function _temp(state) {
	return state.selectedNode;
}
//#endregion
export { UdpAlertsContainer };

//# sourceMappingURL=UdpAlertsContainer.mjs.map