import { c } from "react-compiler-runtime";
import React from "react";
import { Box, Typography, makeStyles, styled } from "@material-ui/core";
//#region src/UI/surfaces/cards/fluentCards/FluentCardText.jsx
const useStyles = makeStyles((theme) => ({
	rootContainer: {
		backgroundColor: theme.palette.background.paper,
		padding: "10px",
		width: "100%",
		boxSizing: "border-box",
		display: "flex",
		flexDirection: "column",
		alignItems: "center",
		justifyContent: "space-evenly",
		gap: "10px",
		[theme.breakpoints.down("sm")]: {
			flexDirection: "row",
			alignItems: "center",
			justifyContent: "space-between"
		}
	},
	title: {
		textAlign: "center",
		fontWeight: 500,
		letterSpacing: "0.15px",
		[theme.breakpoints.down("sm")]: { textAlign: "left" }
	},
	description: {
		fontSize: "1.5rem",
		fontWeight: 300,
		letterSpacing: "0.15px",
		[theme.breakpoints.down("sm")]: {
			fontSize: "1rem",
			textAlign: "left"
		}
	},
	descriptionColor: { color: (props) => props.textColor || theme.palette.text.primary }
}));
const Title = styled(Typography)(({ theme }) => ({
	textAlign: "center",
	fontWeight: 500,
	letterSpacing: "0.15px",
	[theme.breakpoints.down("sm")]: { textAlign: "left" }
}));
const Description = styled(Typography)(({ theme, color }) => ({
	fontSize: "1.5rem",
	fontWeight: 300,
	letterSpacing: "0.15px",
	color: color || theme.palette.text.primary,
	[theme.breakpoints.down("sm")]: {
		fontSize: "1rem",
		textAlign: "left"
	}
}));
const FluentCardText = (props) => {
	const $ = c(16);
	const classes = useStyles(props);
	const { title, description, sx, titleStyle, descriptionStyle, titleVariant: t0, loading: t1, errorMessage: t2 } = props;
	const titleVariant = t0 === void 0 ? "body2" : t0;
	const loading = t1 === void 0 ? false : t1;
	const errorMessage = t2 === void 0 ? "" : t2;
	let t3;
	if ($[0] !== title || $[1] !== titleStyle || $[2] !== titleVariant) {
		t3 = /* @__PURE__ */ React.createElement(Title, {
			variant: titleVariant,
			align: "center",
			style: titleStyle
		}, title);
		$[0] = title;
		$[1] = titleStyle;
		$[2] = titleVariant;
		$[3] = t3;
	} else t3 = $[3];
	let t4;
	if ($[4] !== classes.title || $[5] !== description || $[6] !== descriptionStyle || $[7] !== errorMessage || $[8] !== loading || $[9] !== titleStyle) {
		t4 = loading ? /* @__PURE__ */ React.createElement(Box, { style: {
			width: "100%",
			height: "100%",
			display: "flex",
			alignItems: "center",
			justifyContent: "center"
		} }, /* @__PURE__ */ React.createElement(Typography, {
			align: "center",
			className: classes.title,
			style: titleStyle
		}, "Loading...")) : errorMessage ? /* @__PURE__ */ React.createElement(Description, {
			variant: "body2",
			align: "center",
			style: descriptionStyle,
			color: "error"
		}, errorMessage) : /* @__PURE__ */ React.createElement(Description, {
			variant: "body2",
			align: "center",
			style: descriptionStyle
		}, description);
		$[4] = classes.title;
		$[5] = description;
		$[6] = descriptionStyle;
		$[7] = errorMessage;
		$[8] = loading;
		$[9] = titleStyle;
		$[10] = t4;
	} else t4 = $[10];
	let t5;
	if ($[11] !== classes.rootContainer || $[12] !== sx || $[13] !== t3 || $[14] !== t4) {
		t5 = /* @__PURE__ */ React.createElement(Box, {
			className: classes.rootContainer,
			style: sx
		}, t3, t4);
		$[11] = classes.rootContainer;
		$[12] = sx;
		$[13] = t3;
		$[14] = t4;
		$[15] = t5;
	} else t5 = $[15];
	return t5;
};
//#endregion
export { FluentCardText };

//# sourceMappingURL=FluentCardText.mjs.map