import PrimaryActionButton from "../inputs/buttons/PrimaryActionButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, LinearProgress, makeStyles } from "@material-ui/core";
//#region src/UI/feedback/FluentDialog.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	paper: {
		borderRadius: 2,
		borderTop: (props) => props.header && `4px solid ${theme.palette.secondary.main}`
	},
	title: { color: (props) => props.header && theme.palette.secondary.main },
	actions: {
		marginBottom: 0,
		marginRight: 0,
		padding: 0
	},
	button: {
		borderRadius: 0,
		padding: "calc(.875rem - 3px) 23px calc(.875rem - 3px) 15px",
		textTransform: "none"
	},
	dialogContent: {
		height: (props) => props.dialogContentHeight || "auto",
		width: (props) => props.dialogContentWidth || "auto"
	},
	dialogLeftBorder: {
		position: "absolute",
		left: 0,
		top: 0,
		bottom: 0,
		width: theme.spacing(1),
		backgroundColor: (props) => props.dialogLeftBorderColor ?? theme.palette.primary.main
	}
}));
const FluentDialog = (props) => {
	const $ = c(77);
	const classes = useStyles(props);
	let actionOne;
	let actionThree;
	let actionTwo;
	let ariaDescribedby;
	let ariaLabelledby;
	let children;
	let descriptionId;
	let disableOne;
	let disableThree;
	let disableTwo;
	let handleClose;
	let labelOne;
	let labelThree;
	let labelTwo;
	let message;
	let open;
	let otherProps;
	let progress;
	let t0;
	let t1;
	let t2;
	let t3;
	let title;
	let titleId;
	if ($[0] !== props) {
		({title, message, actionOne, actionTwo, actionThree, labelOne, labelTwo, labelThree, open, handleClose, ariaLabelledby, ariaDescribedby, titleId, descriptionId, children, buttonOneHidden: t0, buttonTwoHidden: t1, buttonThreeHidden: t2, disableOne, disableTwo, disableThree, progress, enableLeftBorderStyling: t3, ...otherProps} = props);
		$[0] = props;
		$[1] = actionOne;
		$[2] = actionThree;
		$[3] = actionTwo;
		$[4] = ariaDescribedby;
		$[5] = ariaLabelledby;
		$[6] = children;
		$[7] = descriptionId;
		$[8] = disableOne;
		$[9] = disableThree;
		$[10] = disableTwo;
		$[11] = handleClose;
		$[12] = labelOne;
		$[13] = labelThree;
		$[14] = labelTwo;
		$[15] = message;
		$[16] = open;
		$[17] = otherProps;
		$[18] = progress;
		$[19] = t0;
		$[20] = t1;
		$[21] = t2;
		$[22] = t3;
		$[23] = title;
		$[24] = titleId;
	} else {
		actionOne = $[1];
		actionThree = $[2];
		actionTwo = $[3];
		ariaDescribedby = $[4];
		ariaLabelledby = $[5];
		children = $[6];
		descriptionId = $[7];
		disableOne = $[8];
		disableThree = $[9];
		disableTwo = $[10];
		handleClose = $[11];
		labelOne = $[12];
		labelThree = $[13];
		labelTwo = $[14];
		message = $[15];
		open = $[16];
		otherProps = $[17];
		progress = $[18];
		t0 = $[19];
		t1 = $[20];
		t2 = $[21];
		t3 = $[22];
		title = $[23];
		titleId = $[24];
	}
	const buttonOneHidden = t0 === void 0 ? false : t0;
	const buttonTwoHidden = t1 === void 0 ? false : t1;
	const buttonThreeHidden = t2 === void 0 ? true : t2;
	const enableLeftBorderStyling = t3 === void 0 ? false : t3;
	let t4;
	if ($[25] !== classes.paper) {
		t4 = { paper: classes.paper };
		$[25] = classes.paper;
		$[26] = t4;
	} else t4 = $[26];
	const t5 = enableLeftBorderStyling ? classes.dialogLeftBorder : "";
	let t6;
	if ($[27] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: t5 });
		$[27] = t5;
		$[28] = t6;
	} else t6 = $[28];
	let t7;
	if ($[29] !== classes.title || $[30] !== title || $[31] !== titleId) {
		t7 = /* @__PURE__ */ React.createElement(DialogTitle, {
			className: classes.title,
			id: titleId
		}, title);
		$[29] = classes.title;
		$[30] = title;
		$[31] = titleId;
		$[32] = t7;
	} else t7 = $[32];
	let t8;
	if ($[33] !== descriptionId || $[34] !== message) {
		t8 = /* @__PURE__ */ React.createElement(DialogContentText, { id: descriptionId }, message);
		$[33] = descriptionId;
		$[34] = message;
		$[35] = t8;
	} else t8 = $[35];
	let t9;
	if ($[36] !== children || $[37] !== classes.dialogContent || $[38] !== t8) {
		t9 = /* @__PURE__ */ React.createElement(DialogContent, { className: classes.dialogContent }, t8, children);
		$[36] = children;
		$[37] = classes.dialogContent;
		$[38] = t8;
		$[39] = t9;
	} else t9 = $[39];
	let t10;
	if ($[40] !== actionThree || $[41] !== buttonThreeHidden || $[42] !== classes.button || $[43] !== disableThree || $[44] !== labelThree) {
		t10 = !buttonThreeHidden && /* @__PURE__ */ React.createElement(Button, {
			id: "udpRecord-FluentDialog-Confirm",
			udprecordid: "udpRecord-FluentDialog-Confirm",
			onClick: actionThree,
			color: "secondary",
			disabled: disableThree,
			className: classes.button
		}, labelThree);
		$[40] = actionThree;
		$[41] = buttonThreeHidden;
		$[42] = classes.button;
		$[43] = disableThree;
		$[44] = labelThree;
		$[45] = t10;
	} else t10 = $[45];
	let t11;
	if ($[46] !== actionTwo || $[47] !== buttonTwoHidden || $[48] !== classes.button || $[49] !== disableTwo || $[50] !== labelTwo) {
		t11 = !buttonTwoHidden && /* @__PURE__ */ React.createElement(Button, {
			id: "udpRecord-FluentDialog-Confirm",
			udprecordid: "udpRecord-FluentDialog-Confirm",
			onClick: actionTwo,
			color: "secondary",
			disabled: disableTwo,
			className: classes.button
		}, labelTwo);
		$[46] = actionTwo;
		$[47] = buttonTwoHidden;
		$[48] = classes.button;
		$[49] = disableTwo;
		$[50] = labelTwo;
		$[51] = t11;
	} else t11 = $[51];
	let t12;
	if ($[52] !== actionOne || $[53] !== buttonOneHidden || $[54] !== disableOne || $[55] !== labelOne) {
		t12 = !buttonOneHidden && /* @__PURE__ */ React.createElement(PrimaryActionButton, {
			id: "udpRecord-FluentDialog-Cancel",
			udprecordid: "udpRecord-FluentDialog-Cancel",
			disabled: disableOne,
			onClick: actionOne
		}, labelOne);
		$[52] = actionOne;
		$[53] = buttonOneHidden;
		$[54] = disableOne;
		$[55] = labelOne;
		$[56] = t12;
	} else t12 = $[56];
	let t13;
	if ($[57] !== classes.actions || $[58] !== t10 || $[59] !== t11 || $[60] !== t12) {
		t13 = /* @__PURE__ */ React.createElement(DialogActions, {
			className: classes.actions,
			disableSpacing: true
		}, t10, t11, t12);
		$[57] = classes.actions;
		$[58] = t10;
		$[59] = t11;
		$[60] = t12;
		$[61] = t13;
	} else t13 = $[61];
	let t14;
	if ($[62] !== otherProps || $[63] !== progress) {
		t14 = progress && /* @__PURE__ */ React.createElement(LinearProgress, {
			color: "secondary",
			value: progress,
			...otherProps
		});
		$[62] = otherProps;
		$[63] = progress;
		$[64] = t14;
	} else t14 = $[64];
	let t15;
	if ($[65] !== ariaDescribedby || $[66] !== ariaLabelledby || $[67] !== handleClose || $[68] !== open || $[69] !== otherProps || $[70] !== t13 || $[71] !== t14 || $[72] !== t4 || $[73] !== t6 || $[74] !== t7 || $[75] !== t9) {
		t15 = /* @__PURE__ */ React.createElement(Dialog, {
			open,
			onClose: handleClose,
			"aria-labelledby": ariaLabelledby,
			"aria-describedby": ariaDescribedby,
			...otherProps,
			classes: t4
		}, t6, t7, t9, t13, t14);
		$[65] = ariaDescribedby;
		$[66] = ariaLabelledby;
		$[67] = handleClose;
		$[68] = open;
		$[69] = otherProps;
		$[70] = t13;
		$[71] = t14;
		$[72] = t4;
		$[73] = t6;
		$[74] = t7;
		$[75] = t9;
		$[76] = t15;
	} else t15 = $[76];
	return t15;
};
//#endregion
export { FluentDialog };

//# sourceMappingURL=FluentDialog.mjs.map