import { c } from "react-compiler-runtime";
import React from "react";
import { Button, Card, CardContent, Typography, makeStyles } from "@material-ui/core";
import { Link as Link$1 } from "react-router-dom";
//#region src/routes/components/PageStatus.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		justifyContent: "center",
		alignItems: "center"
	},
	card: {
		background: theme.palette.primary.main,
		minWidth: (props) => props?.minWidth,
		minHeight: (props) => props?.minHeight
	},
	subHeader: { marginTop: theme.spacing(3) },
	content: { color: theme.palette.getContrastText(theme.palette.primary.main) },
	header: {
		textAlign: "center",
		marginTop: theme.spacing(2)
	},
	button: {
		marginTop: theme.spacing(8),
		display: "flex",
		justifyContent: "center"
	},
	largeDisplay: {
		fontSize: "4rem",
		color: theme.palette.getContrastText(theme.palette.primary.main)
	},
	message: { marginTop: theme.spacing(3) }
}));
const PageStatus = (props) => {
	const $ = c(38);
	const classes = useStyles(props);
	const { title, subheader, message, to, buttonLabel, statusCode, showButton: t0 } = props;
	const showButton = t0 === void 0 ? true : t0;
	let t1;
	if ($[0] !== classes.largeDisplay || $[1] !== statusCode) {
		t1 = statusCode && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, { className: classes.largeDisplay }, statusCode));
		$[0] = classes.largeDisplay;
		$[1] = statusCode;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== title) {
		t2 = /* @__PURE__ */ React.createElement(Typography, { variant: "h6" }, title);
		$[3] = title;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== classes.subHeader || $[6] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.subHeader }, t2);
		$[5] = classes.subHeader;
		$[6] = t2;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== classes.header || $[9] !== t1 || $[10] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.header }, t1, t3);
		$[8] = classes.header;
		$[9] = t1;
		$[10] = t3;
		$[11] = t4;
	} else t4 = $[11];
	let t5;
	if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = { fontWeight: 700 };
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[13] !== subheader) {
		t6 = /* @__PURE__ */ React.createElement(Typography, {
			variant: "overline",
			style: t5
		}, subheader);
		$[13] = subheader;
		$[14] = t6;
	} else t6 = $[14];
	let t7;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = { textAlign: "left" };
		$[15] = t7;
	} else t7 = $[15];
	let t8;
	if ($[16] !== message) {
		t8 = /* @__PURE__ */ React.createElement("div", { style: t7 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, message));
		$[16] = message;
		$[17] = t8;
	} else t8 = $[17];
	let t9;
	if ($[18] !== classes.message || $[19] !== t6 || $[20] !== t8) {
		t9 = /* @__PURE__ */ React.createElement("div", { className: classes.message }, t6, t8);
		$[18] = classes.message;
		$[19] = t6;
		$[20] = t8;
		$[21] = t9;
	} else t9 = $[21];
	let t10;
	if ($[22] !== buttonLabel || $[23] !== classes.button || $[24] !== showButton || $[25] !== to) {
		t10 = showButton && /* @__PURE__ */ React.createElement("div", { className: classes.button }, /* @__PURE__ */ React.createElement(Button, {
			component: Link$1,
			to,
			variant: "contained",
			color: "secondary",
			id: `udpRecord-PageStatus-${buttonLabel}`,
			udprecordid: `udpRecord-PageStatus-${buttonLabel}`
		}, buttonLabel));
		$[22] = buttonLabel;
		$[23] = classes.button;
		$[24] = showButton;
		$[25] = to;
		$[26] = t10;
	} else t10 = $[26];
	let t11;
	if ($[27] !== classes.content || $[28] !== t10 || $[29] !== t4 || $[30] !== t9) {
		t11 = /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement("div", { className: classes.content }, t4, t9, t10));
		$[27] = classes.content;
		$[28] = t10;
		$[29] = t4;
		$[30] = t9;
		$[31] = t11;
	} else t11 = $[31];
	let t12;
	if ($[32] !== classes.card || $[33] !== t11) {
		t12 = /* @__PURE__ */ React.createElement(Card, { className: classes.card }, t11);
		$[32] = classes.card;
		$[33] = t11;
		$[34] = t12;
	} else t12 = $[34];
	let t13;
	if ($[35] !== classes.root || $[36] !== t12) {
		t13 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t12);
		$[35] = classes.root;
		$[36] = t12;
		$[37] = t13;
	} else t13 = $[37];
	return t13;
};
//#endregion
export { PageStatus };

//# sourceMappingURL=PageStatus.mjs.map