import { PageStatus } from "./PageStatus.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import { useTranslation } from "react-i18next";
//#region src/routes/components/PageForbiddenRoute.jsx
const useStyles = makeStyles((theme) => ({ root: { marginTop: theme.spacing(4) } }));
const PageForbiddenRoute = (props) => {
	const $ = c(21);
	const { title, statusCode, subheader, message, showButton } = props;
	const classes = useStyles();
	const { t } = useTranslation();
	const t0 = classes.root;
	let t1;
	if ($[0] !== t || $[1] !== title) {
		t1 = title ?? t("Page Forbidden");
		$[0] = t;
		$[1] = title;
		$[2] = t1;
	} else t1 = $[2];
	const t2 = statusCode ?? "403";
	let t3;
	if ($[3] !== subheader || $[4] !== t) {
		t3 = subheader ?? t("Sorry, you do not have permission to view this page.");
		$[3] = subheader;
		$[4] = t;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== message || $[7] !== t) {
		t4 = message ?? t("Please contact an administrator to get access.");
		$[6] = message;
		$[7] = t;
		$[8] = t4;
	} else t4 = $[8];
	let t5;
	if ($[9] !== t) {
		t5 = t("Back to Home Page");
		$[9] = t;
		$[10] = t5;
	} else t5 = $[10];
	let t6;
	if ($[11] !== showButton || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4 || $[16] !== t5) {
		t6 = /* @__PURE__ */ React.createElement(PageStatus, {
			title: t1,
			statusCode: t2,
			subheader: t3,
			message: t4,
			to: "/",
			buttonLabel: t5,
			showButton
		});
		$[11] = showButton;
		$[12] = t1;
		$[13] = t2;
		$[14] = t3;
		$[15] = t4;
		$[16] = t5;
		$[17] = t6;
	} else t6 = $[17];
	let t7;
	if ($[18] !== classes.root || $[19] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t6);
		$[18] = classes.root;
		$[19] = t6;
		$[20] = t7;
	} else t7 = $[20];
	return t7;
};
//#endregion
export { PageForbiddenRoute };

//# sourceMappingURL=PageForbiddenRoute.mjs.map