import { LayoutUnit } from "../../layout/LayoutUnit.mjs";
import { SideSheet } from "../surfaces/SideSheet.mjs";
import { DraggableSidebarTemplate } from "../templates/DraggableSidebarTemplate.mjs";
import { FluentDialog } from "../feedback/FluentDialog.mjs";
import { AmbientGridTemplate } from "../templates/deprecated/AmbientGridTemplate/AmbientGridTemplate.mjs";
import { SubHeaderAction } from "../../utilities/utilityBar/SubHeaderAction.mjs";
import { HeaderExpander } from "../dataDisplay/HeaderExpander.mjs";
import { AmbientToast } from "../feedback/AmbientToast.mjs";
import { AmbientAlert } from "../feedback/AmbientAlert.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Card, CardContent, Slide, makeStyles, useMediaQuery, useTheme } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/UI/floorplans/CoreLayoutFloorplan.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	cardDisplay: { marginBottom: theme.spacing(2) },
	padding: { padding: (props) => !props.noPadding && theme.spacing(1) },
	splitScreen: {
		width: "100%",
		height: "100%"
	}
}), { name: "CoreLayoutFloorplan" });
const CoreLayoutFloorplan = (props) => {
	const $ = c(148);
	let PrimaryActionHeader;
	let alertButton;
	let alertMessage;
	let alertSeverity;
	let children;
	let closeAlert;
	let closeNotice;
	let columnDefinitions;
	let compactHeader;
	let defaultAutoSize;
	let dialogActionOne;
	let dialogActionTwo;
	let dialogClose;
	let dialogLabelOne;
	let dialogLabelTwo;
	let dialogMessage;
	let dialogOpen;
	let dialogTitle;
	let disableDialogAction;
	let expandedData;
	let expanderLeftContainer;
	let footer;
	let gridData;
	let gridTemplateTitle;
	let groupData;
	let headerExpanded;
	let hideSidebarButton;
	let noticeAction;
	let noticeButton;
	let noticeMessage;
	let noticeOpen;
	let noticeType;
	let otherProps;
	let removeHeader;
	let removePadding;
	let setSideSheetClose;
	let setSplitScreenWidth;
	let showAlert;
	let sideSheetButton;
	let sideSheetContent;
	let sideSheetDisabled;
	let sideSheetOpen;
	let sideSheetProgress;
	let sideSheetTitle;
	let splitScreen;
	let splitScreenContent;
	let splitScreenWidth;
	let t0;
	let t1;
	let t2;
	if ($[0] !== props) {
		const { PrimaryActionHeader: t3, children: t4, footer: t5, gridData: t6, groupData: t7, columnDefinitions: t8, expandedData: t9, splitScreen: t10, splitScreenContent: t11, splitScreenWidth: t12, setSplitScreenWidth: t13, sideSheetTitle: t14, sideSheetButton: t15, sideSheetDisabled: t16, sideSheetProgress: t17, sideSheetOpen: t18, setSideSheetOpen, setSideSheetClose: t19, sideSheetContent: t20, dialogActionOne: t21, dialogActionTwo: t22, dialogClose: t23, dialogOpen: t24, dialogTitle: t25, dialogMessage: t26, dialogLabelOne: t27, dialogLabelTwo: t28, notice, alertButton: t29, alertMessage: t30, alertType, closeNotice: t31, noticeOpen: t32, noticeAction: t33, noticeType: t34, noticeMessage: t35, noticeButton: t36, alertSeverity: t37, showAlert: t38, closeAlert: t39, DialogLoadingvariant: t40, disableDialogAction: t41, compactHeader: t42, headerExpanded: t43, expanderLeftContainer: t44, gridTemplateTitle: t45, removePadding: t46, removeHeader: t47, hideSidebarButton: t48, defaultAutoSize: t49, hideGrid: t50, useSubHeaderAction: t51, ...t52 } = props;
		PrimaryActionHeader = t3;
		children = t4;
		footer = t5;
		gridData = t6;
		groupData = t7;
		columnDefinitions = t8;
		expandedData = t9;
		splitScreen = t10;
		splitScreenContent = t11;
		splitScreenWidth = t12;
		setSplitScreenWidth = t13;
		sideSheetTitle = t14;
		sideSheetButton = t15;
		sideSheetDisabled = t16;
		sideSheetProgress = t17;
		sideSheetOpen = t18;
		setSideSheetClose = t19;
		sideSheetContent = t20;
		dialogActionOne = t21;
		dialogActionTwo = t22;
		dialogClose = t23;
		dialogOpen = t24;
		dialogTitle = t25;
		dialogMessage = t26;
		dialogLabelOne = t27;
		dialogLabelTwo = t28;
		alertButton = t29;
		alertMessage = t30;
		closeNotice = t31;
		noticeOpen = t32;
		noticeAction = t33;
		noticeType = t34;
		noticeMessage = t35;
		noticeButton = t36;
		alertSeverity = t37;
		showAlert = t38;
		closeAlert = t39;
		t0 = t40;
		disableDialogAction = t41;
		compactHeader = t42;
		headerExpanded = t43;
		expanderLeftContainer = t44;
		gridTemplateTitle = t45;
		removePadding = t46;
		removeHeader = t47;
		hideSidebarButton = t48;
		defaultAutoSize = t49;
		t1 = t50;
		t2 = t51;
		otherProps = t52;
		$[0] = props;
		$[1] = PrimaryActionHeader;
		$[2] = alertButton;
		$[3] = alertMessage;
		$[4] = alertSeverity;
		$[5] = children;
		$[6] = closeAlert;
		$[7] = closeNotice;
		$[8] = columnDefinitions;
		$[9] = compactHeader;
		$[10] = defaultAutoSize;
		$[11] = dialogActionOne;
		$[12] = dialogActionTwo;
		$[13] = dialogClose;
		$[14] = dialogLabelOne;
		$[15] = dialogLabelTwo;
		$[16] = dialogMessage;
		$[17] = dialogOpen;
		$[18] = dialogTitle;
		$[19] = disableDialogAction;
		$[20] = expandedData;
		$[21] = expanderLeftContainer;
		$[22] = footer;
		$[23] = gridData;
		$[24] = gridTemplateTitle;
		$[25] = groupData;
		$[26] = headerExpanded;
		$[27] = hideSidebarButton;
		$[28] = noticeAction;
		$[29] = noticeButton;
		$[30] = noticeMessage;
		$[31] = noticeOpen;
		$[32] = noticeType;
		$[33] = otherProps;
		$[34] = removeHeader;
		$[35] = removePadding;
		$[36] = setSideSheetClose;
		$[37] = setSplitScreenWidth;
		$[38] = showAlert;
		$[39] = sideSheetButton;
		$[40] = sideSheetContent;
		$[41] = sideSheetDisabled;
		$[42] = sideSheetOpen;
		$[43] = sideSheetProgress;
		$[44] = sideSheetTitle;
		$[45] = splitScreen;
		$[46] = splitScreenContent;
		$[47] = splitScreenWidth;
		$[48] = t0;
		$[49] = t1;
		$[50] = t2;
	} else {
		PrimaryActionHeader = $[1];
		alertButton = $[2];
		alertMessage = $[3];
		alertSeverity = $[4];
		children = $[5];
		closeAlert = $[6];
		closeNotice = $[7];
		columnDefinitions = $[8];
		compactHeader = $[9];
		defaultAutoSize = $[10];
		dialogActionOne = $[11];
		dialogActionTwo = $[12];
		dialogClose = $[13];
		dialogLabelOne = $[14];
		dialogLabelTwo = $[15];
		dialogMessage = $[16];
		dialogOpen = $[17];
		dialogTitle = $[18];
		disableDialogAction = $[19];
		expandedData = $[20];
		expanderLeftContainer = $[21];
		footer = $[22];
		gridData = $[23];
		gridTemplateTitle = $[24];
		groupData = $[25];
		headerExpanded = $[26];
		hideSidebarButton = $[27];
		noticeAction = $[28];
		noticeButton = $[29];
		noticeMessage = $[30];
		noticeOpen = $[31];
		noticeType = $[32];
		otherProps = $[33];
		removeHeader = $[34];
		removePadding = $[35];
		setSideSheetClose = $[36];
		setSplitScreenWidth = $[37];
		showAlert = $[38];
		sideSheetButton = $[39];
		sideSheetContent = $[40];
		sideSheetDisabled = $[41];
		sideSheetOpen = $[42];
		sideSheetProgress = $[43];
		sideSheetTitle = $[44];
		splitScreen = $[45];
		splitScreenContent = $[46];
		splitScreenWidth = $[47];
		t0 = $[48];
		t1 = $[49];
		t2 = $[50];
	}
	const DialogLoadingvariant = t0 === void 0 ? "determinate" : t0;
	const hideGrid = t1 === void 0 ? false : t1;
	const useSubHeaderAction = t2 === void 0 ? true : t2;
	const theme = useTheme();
	let t3;
	if ($[51] !== theme.breakpoints) {
		t3 = theme.breakpoints.up("sm");
		$[51] = theme.breakpoints;
		$[52] = t3;
	} else t3 = $[52];
	const desktop = useMediaQuery(t3);
	let t4;
	if ($[53] !== theme.breakpoints) {
		t4 = theme.breakpoints.down("sm");
		$[53] = theme.breakpoints;
		$[54] = t4;
	} else t4 = $[54];
	useMediaQuery(t4);
	const classes = useStyles(props);
	let t5;
	if ($[55] !== alertButton || $[56] !== alertMessage || $[57] !== alertSeverity || $[58] !== closeAlert || $[59] !== showAlert) {
		t5 = /* @__PURE__ */ React.createElement(AmbientAlert, {
			alertMessage,
			alertButton,
			alertSeverity,
			showAlert,
			closeAlert
		});
		$[55] = alertButton;
		$[56] = alertMessage;
		$[57] = alertSeverity;
		$[58] = closeAlert;
		$[59] = showAlert;
		$[60] = t5;
	} else t5 = $[60];
	let t6;
	if ($[61] !== PrimaryActionHeader || $[62] !== t5) {
		t6 = /* @__PURE__ */ React.createElement(React.Fragment, null, t5, PrimaryActionHeader);
		$[61] = PrimaryActionHeader;
		$[62] = t5;
		$[63] = t6;
	} else t6 = $[63];
	const actionHeader = t6;
	let t7;
	if ($[64] !== PrimaryActionHeader || $[65] !== actionHeader || $[66] !== useSubHeaderAction) {
		t7 = !useSubHeaderAction && !!PrimaryActionHeader && /* @__PURE__ */ React.createElement(Card, { variant: "outlined" }, actionHeader);
		$[64] = PrimaryActionHeader;
		$[65] = actionHeader;
		$[66] = useSubHeaderAction;
		$[67] = t7;
	} else t7 = $[67];
	let t8;
	if ($[68] !== PrimaryActionHeader || $[69] !== actionHeader || $[70] !== useSubHeaderAction) {
		t8 = useSubHeaderAction && !!PrimaryActionHeader && /* @__PURE__ */ React.createElement(SubHeaderAction, null, actionHeader);
		$[68] = PrimaryActionHeader;
		$[69] = actionHeader;
		$[70] = useSubHeaderAction;
		$[71] = t8;
	} else t8 = $[71];
	let t9;
	if ($[72] !== classes || $[73] !== compactHeader || $[74] !== expandedData || $[75] !== expanderLeftContainer || $[76] !== headerExpanded || $[77] !== removeHeader) {
		t9 = !removeHeader && /* @__PURE__ */ React.createElement(HeaderExpander, {
			toggleLabel: "Data Visualization",
			sectionOpen: headerExpanded,
			compact: compactHeader,
			options: expanderLeftContainer
		}, /* @__PURE__ */ React.createElement("div", { className: classes.padding }, " ", expandedData, " "));
		$[72] = classes;
		$[73] = compactHeader;
		$[74] = expandedData;
		$[75] = expanderLeftContainer;
		$[76] = headerExpanded;
		$[77] = removeHeader;
		$[78] = t9;
	} else t9 = $[78];
	let t10;
	if ($[79] !== removeHeader) {
		t10 = !removeHeader && /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" });
		$[79] = removeHeader;
		$[80] = t10;
	} else t10 = $[80];
	let t11;
	if ($[81] !== columnDefinitions || $[82] !== defaultAutoSize || $[83] !== gridData || $[84] !== gridTemplateTitle || $[85] !== groupData || $[86] !== hideGrid || $[87] !== otherProps) {
		t11 = !hideGrid && /* @__PURE__ */ React.createElement(AmbientGridTemplate, {
			...otherProps,
			title: gridTemplateTitle,
			data: gridData,
			columnDefs: columnDefinitions,
			groupingData: groupData,
			defaultAutoSize
		});
		$[81] = columnDefinitions;
		$[82] = defaultAutoSize;
		$[83] = gridData;
		$[84] = gridTemplateTitle;
		$[85] = groupData;
		$[86] = hideGrid;
		$[87] = otherProps;
		$[88] = t11;
	} else t11 = $[88];
	let t12;
	if ($[89] !== children || $[90] !== t10 || $[91] !== t11 || $[92] !== t7 || $[93] !== t8 || $[94] !== t9) {
		t12 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, t7, t8, t9, t10, children, t11));
		$[89] = children;
		$[90] = t10;
		$[91] = t11;
		$[92] = t7;
		$[93] = t8;
		$[94] = t9;
		$[95] = t12;
	} else t12 = $[95];
	const t13 = splitScreen && splitScreen;
	let t14;
	if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = { height: "100%" };
		$[96] = t14;
	} else t14 = $[96];
	let t15;
	if ($[97] !== classes || $[98] !== splitScreen || $[99] !== splitScreenContent) {
		t15 = splitScreen && /* @__PURE__ */ React.createElement("div", { className: classes.splitScreen }, /* @__PURE__ */ React.createElement(Card, {
			square: true,
			style: { height: "100%" }
		}, /* @__PURE__ */ React.createElement(CardContent, null, splitScreenContent)));
		$[97] = classes;
		$[98] = splitScreen;
		$[99] = splitScreenContent;
		$[100] = t15;
	} else t15 = $[100];
	let t16;
	if ($[101] !== t15) {
		t16 = /* @__PURE__ */ React.createElement("div", { style: t14 }, t15);
		$[101] = t15;
		$[102] = t16;
	} else t16 = $[102];
	let t17;
	if ($[103] !== t13 || $[104] !== t16) {
		t17 = /* @__PURE__ */ React.createElement(Slide, {
			in: t13,
			direction: "left"
		}, t16);
		$[103] = t13;
		$[104] = t16;
		$[105] = t17;
	} else t17 = $[105];
	let t18;
	if ($[106] !== hideSidebarButton || $[107] !== otherProps || $[108] !== removePadding || $[109] !== setSplitScreenWidth || $[110] !== splitScreenWidth || $[111] !== t12 || $[112] !== t17) {
		t18 = /* @__PURE__ */ React.createElement(DraggableSidebarTemplate, {
			width: splitScreenWidth,
			setWidth: setSplitScreenWidth,
			removePadding,
			hide: hideSidebarButton,
			...otherProps,
			body: t12,
			sidebar: t17
		});
		$[106] = hideSidebarButton;
		$[107] = otherProps;
		$[108] = removePadding;
		$[109] = setSplitScreenWidth;
		$[110] = splitScreenWidth;
		$[111] = t12;
		$[112] = t17;
		$[113] = t18;
	} else t18 = $[113];
	const t19 = !desktop ? 350 : 500;
	let t20;
	if ($[114] !== setSideSheetClose || $[115] !== sideSheetButton || $[116] !== sideSheetContent || $[117] !== sideSheetDisabled || $[118] !== sideSheetOpen || $[119] !== sideSheetProgress || $[120] !== sideSheetTitle || $[121] !== t19) {
		t20 = /* @__PURE__ */ React.createElement(SideSheet, {
			key: "sideSheet",
			title: sideSheetTitle,
			width: t19,
			buttonLabel: sideSheetButton,
			open: sideSheetOpen,
			onClose: setSideSheetClose,
			disabled: sideSheetDisabled,
			progress: sideSheetProgress,
			buttonProgress: true,
			children: sideSheetContent
		});
		$[114] = setSideSheetClose;
		$[115] = sideSheetButton;
		$[116] = sideSheetContent;
		$[117] = sideSheetDisabled;
		$[118] = sideSheetOpen;
		$[119] = sideSheetProgress;
		$[120] = sideSheetTitle;
		$[121] = t19;
		$[122] = t20;
	} else t20 = $[122];
	let t21;
	if ($[123] !== DialogLoadingvariant || $[124] !== dialogActionOne || $[125] !== dialogActionTwo || $[126] !== dialogClose || $[127] !== dialogLabelOne || $[128] !== dialogLabelTwo || $[129] !== dialogMessage || $[130] !== dialogOpen || $[131] !== dialogTitle || $[132] !== disableDialogAction) {
		t21 = /* @__PURE__ */ React.createElement(FluentDialog, {
			title: dialogTitle,
			message: dialogMessage,
			labelOne: dialogLabelOne,
			actionOne: dialogActionOne,
			labelTwo: dialogLabelTwo,
			actionTwo: dialogActionTwo,
			open: dialogOpen,
			handleClose: dialogClose,
			progress: 20,
			variant: DialogLoadingvariant,
			disableTwo: disableDialogAction
		});
		$[123] = DialogLoadingvariant;
		$[124] = dialogActionOne;
		$[125] = dialogActionTwo;
		$[126] = dialogClose;
		$[127] = dialogLabelOne;
		$[128] = dialogLabelTwo;
		$[129] = dialogMessage;
		$[130] = dialogOpen;
		$[131] = dialogTitle;
		$[132] = disableDialogAction;
		$[133] = t21;
	} else t21 = $[133];
	let t22;
	if ($[134] !== alertSeverity || $[135] !== closeNotice || $[136] !== noticeAction || $[137] !== noticeButton || $[138] !== noticeMessage || $[139] !== noticeOpen || $[140] !== noticeType) {
		t22 = /* @__PURE__ */ React.createElement(AmbientToast, {
			noticeType,
			noticeMessage,
			noticeButton,
			closeNotice,
			noticeOpen,
			noticeAction,
			alertSeverity
		});
		$[134] = alertSeverity;
		$[135] = closeNotice;
		$[136] = noticeAction;
		$[137] = noticeButton;
		$[138] = noticeMessage;
		$[139] = noticeOpen;
		$[140] = noticeType;
		$[141] = t22;
	} else t22 = $[141];
	let t23;
	if ($[142] !== footer || $[143] !== t18 || $[144] !== t20 || $[145] !== t21 || $[146] !== t22) {
		t23 = /* @__PURE__ */ React.createElement("div", null, t18, t20, t21, t22, footer);
		$[142] = footer;
		$[143] = t18;
		$[144] = t20;
		$[145] = t21;
		$[146] = t22;
		$[147] = t23;
	} else t23 = $[147];
	return t23;
};
CoreLayoutFloorplan.propTypes = {
	PrimaryActionHeader: PropTypes.node,
	children: PropTypes.object,
	splitScreenContent: PropTypes.node,
	gridData: PropTypes.array,
	groupData: PropTypes.array,
	columnDefinitions: PropTypes.arrayOf(PropTypes.object),
	expandedData: PropTypes.string,
	splitScreen: PropTypes.string,
	splitScreenWidth: PropTypes.string,
	setSplitScreenWidth: PropTypes.string,
	sideSheetTitle: PropTypes.string,
	sideSheetButton: PropTypes.string,
	sideSheetDisabled: PropTypes.string,
	sideSheetProgress: PropTypes.number,
	sideSheetOpen: PropTypes.bool,
	setSideSheetOpen: PropTypes.string,
	setSideSheetClose: PropTypes.string,
	setSideSheetContent: PropTypes.string,
	dialogActionOne: PropTypes.string,
	dialogActionTwo: PropTypes.string,
	dialogClose: PropTypes.string,
	dialogOpen: PropTypes.string,
	dialogTitle: PropTypes.string,
	dialogMessage: PropTypes.string,
	dialogLabelOne: PropTypes.string,
	dialogLableTwo: PropTypes.string,
	notice: PropTypes.string,
	alertButton: PropTypes.string,
	alertMessage: PropTypes.string,
	alertType: PropTypes.string,
	closeNotice: PropTypes.string,
	noticeOpen: PropTypes.string,
	noticeAction: PropTypes.string,
	noticeType: PropTypes.string,
	noticeMessage: PropTypes.string,
	noticeButton: PropTypes.string,
	alertSeverity: PropTypes.string,
	showAlert: PropTypes.string,
	closeAlert: PropTypes.string,
	DialogLoadingvariant: PropTypes.string,
	disableDialogAction: PropTypes.string,
	compactHeader: PropTypes.string,
	headerExpanded: PropTypes.string,
	expanderLeftContainer: PropTypes.string,
	defaultAutoSize: PropTypes.bool,
	useSubHeaderAction: PropTypes.bool
};
//#endregion
export { CoreLayoutFloorplan };

//# sourceMappingURL=CoreLayoutFloorplan.mjs.map