import { FluentButton } from "../inputs/buttons/FluentButton.mjs";
import { FluentIcon } from "../../utilities/iconLibrary/FluentIcon.mjs";
import { LayoutUnit } from "../../layout/LayoutUnit.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, makeStyles } from "@material-ui/core";
import { ErrorIcon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/dataDisplay/EmptyStateDisplay.jsx
const useStyles = makeStyles((theme) => ({
	container: {
		display: "flex",
		flexDirection: "column",
		alignItems: "center",
		justifyContent: "center",
		height: "100%",
		width: "100%"
	},
	secondaryText: { color: theme.palette.text.secondary },
	image: { width: (props) => props?.imageWidth }
}));
const EmptyStateDisplay = (props) => {
	const $ = c(30);
	const { icon, iconSize: t0, customIconSize: t1, imageSrc, imageWidth: t2, primaryText, secondaryText, actionLabel, action } = props;
	const iconSize = t0 === void 0 ? 48 : t0;
	const customIconSize = t1 === void 0 ? true : t1;
	const imageWidth = t2 === void 0 ? "100px" : t2;
	let t3;
	if ($[0] !== imageWidth) {
		t3 = { imageWidth };
		$[0] = imageWidth;
		$[1] = t3;
	} else t3 = $[1];
	const classes = useStyles(t3);
	let t4;
	if ($[2] !== classes.image || $[3] !== customIconSize || $[4] !== icon || $[5] !== iconSize || $[6] !== imageSrc) {
		t4 = imageSrc ? /* @__PURE__ */ React.createElement("img", {
			src: imageSrc,
			alt: "logo",
			className: classes.image
		}) : /* @__PURE__ */ React.createElement(FluentIcon, {
			component: icon ?? ErrorIcon,
			size: iconSize,
			customSize: customIconSize
		});
		$[2] = classes.image;
		$[3] = customIconSize;
		$[4] = icon;
		$[5] = iconSize;
		$[6] = imageSrc;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" });
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== primaryText) {
		t6 = primaryText && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, {
			variant: "subtitle2",
			align: "center"
		}, primaryText));
		$[9] = primaryText;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== classes.secondaryText || $[12] !== secondaryText) {
		t7 = secondaryText && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, {
			className: classes.secondaryText,
			align: "center"
		}, secondaryText));
		$[11] = classes.secondaryText;
		$[12] = secondaryText;
		$[13] = t7;
	} else t7 = $[13];
	let t8;
	if ($[14] !== primaryText || $[15] !== secondaryText) {
		t8 = (primaryText || secondaryText) && /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" });
		$[14] = primaryText;
		$[15] = secondaryText;
		$[16] = t8;
	} else t8 = $[16];
	let t9;
	if ($[17] !== action || $[18] !== actionLabel || $[19] !== classes.buttonWrapper || $[20] !== primaryText || $[21] !== secondaryText) {
		t9 = action && /* @__PURE__ */ React.createElement("div", { className: primaryText || secondaryText ? classes.buttonWrapper : "" }, /* @__PURE__ */ React.createElement(FluentButton, {
			onClick: action,
			variant: "outlined",
			color: "secondary",
			id: "udpRecord-EmptyStateDisplay-" + primaryText.replace(/\s+/g, "") + "-" + actionLabel.replace(/\s+/g, ""),
			udprecordid: "udpRecord-EmptyStateDisplay-" + primaryText.replace(/\s+/g, "") + "-" + actionLabel.replace(/\s+/g, "")
		}, actionLabel));
		$[17] = action;
		$[18] = actionLabel;
		$[19] = classes.buttonWrapper;
		$[20] = primaryText;
		$[21] = secondaryText;
		$[22] = t9;
	} else t9 = $[22];
	let t10;
	if ($[23] !== classes.container || $[24] !== t4 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8 || $[28] !== t9) {
		t10 = /* @__PURE__ */ React.createElement("div", { className: classes.container }, t4, t5, t6, t7, t8, t9);
		$[23] = classes.container;
		$[24] = t4;
		$[25] = t6;
		$[26] = t7;
		$[27] = t8;
		$[28] = t9;
		$[29] = t10;
	} else t10 = $[29];
	return t10;
};
EmptyStateDisplay.propTypes = {
	icon: PropTypes.elementType,
	iconSize: PropTypes.number,
	customIconSize: PropTypes.bool,
	imageSrc: PropTypes.string,
	imageWidth: PropTypes.string,
	primaryText: PropTypes.string,
	secondaryText: PropTypes.string,
	actionLabel: PropTypes.string,
	action: PropTypes.func
};
EmptyStateDisplay.defaultProps = {
	iconSize: 48,
	customIconSize: true,
	imageWidth: "100px"
};
//#endregion
export { EmptyStateDisplay };

//# sourceMappingURL=EmptyStateDisplay.mjs.map