import { LayoutUnit } from "../../../layout/LayoutUnit.mjs";
import { FluentCard } from "./fluentCards/FluentCard.mjs";
import { c } from "react-compiler-runtime";
import React, { Fragment } from "react";
import { CardContent, Divider, Typography, lighten, makeStyles } from "@material-ui/core";
import clsx from "clsx";
import PropTypes from "prop-types";
//#region src/UI/surfaces/cards/InfoCard.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	paper: {
		background: lighten(theme.palette.info.light, .8),
		borderTop: `5px solid ${theme.palette.info.main} `
	},
	title: {
		color: theme.palette.info.dark,
		highlightfontWeight: 400,
		lineHeight: 1.6
	},
	subHeader: {
		lineHeight: 1.6,
		fontWeight: 600
	}
}));
const InfoCard = (t0) => {
	const $ = c(35);
	const { children, title, subTitle, relatedTopics, label, headerComponent: t1, subHeaderComponent: t2, size, titleVariant: t3, className, titleHeight } = t0;
	const headerComponent = t1 === void 0 ? "h2" : t1;
	const subHeaderComponent = t2 === void 0 ? "h3" : t2;
	const titleVariant = t3 === void 0 ? "h6" : t3;
	const classes = useStyles();
	let t4;
	if ($[0] !== classes.paper) {
		t4 = { root: classes.paper };
		$[0] = classes.paper;
		$[1] = t4;
	} else t4 = $[1];
	let t5;
	if ($[2] !== className || $[3] !== classes.root) {
		t5 = clsx(classes.root, className);
		$[2] = className;
		$[3] = classes.root;
		$[4] = t5;
	} else t5 = $[4];
	let t6;
	if ($[5] !== classes.title || $[6] !== titleHeight) {
		t6 = clsx(classes.title, titleHeight);
		$[5] = classes.title;
		$[6] = titleHeight;
		$[7] = t6;
	} else t6 = $[7];
	let t7;
	if ($[8] !== headerComponent || $[9] !== t6 || $[10] !== title || $[11] !== titleVariant) {
		t7 = /* @__PURE__ */ React.createElement(Typography, {
			variant: titleVariant,
			component: headerComponent,
			className: t6
		}, title);
		$[8] = headerComponent;
		$[9] = t6;
		$[10] = title;
		$[11] = titleVariant;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== size) {
		t8 = size === "standard" && /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" });
		$[13] = size;
		$[14] = t8;
	} else t8 = $[14];
	let t9;
	if ($[15] !== classes.subHeader || $[16] !== subHeaderComponent || $[17] !== subTitle) {
		t9 = /* @__PURE__ */ React.createElement(Typography, {
			variant: "subtitle2",
			component: subHeaderComponent,
			className: classes.subHeader
		}, subTitle);
		$[15] = classes.subHeader;
		$[16] = subHeaderComponent;
		$[17] = subTitle;
		$[18] = t9;
	} else t9 = $[18];
	let t10;
	if ($[19] !== size) {
		t10 = size === "standard" && /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" });
		$[19] = size;
		$[20] = t10;
	} else t10 = $[20];
	let t11;
	if ($[21] !== label || $[22] !== relatedTopics) {
		t11 = relatedTopics && /* @__PURE__ */ React.createElement(Fragment, null, /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" }), /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, label || "Related Topics"), /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "xxs" }), relatedTopics);
		$[21] = label;
		$[22] = relatedTopics;
		$[23] = t11;
	} else t11 = $[23];
	let t12;
	if ($[24] !== children || $[25] !== t10 || $[26] !== t11 || $[27] !== t7 || $[28] !== t8 || $[29] !== t9) {
		t12 = /* @__PURE__ */ React.createElement(CardContent, null, t7, t8, t9, children, t10, t11);
		$[24] = children;
		$[25] = t10;
		$[26] = t11;
		$[27] = t7;
		$[28] = t8;
		$[29] = t9;
		$[30] = t12;
	} else t12 = $[30];
	let t13;
	if ($[31] !== t12 || $[32] !== t4 || $[33] !== t5) {
		t13 = /* @__PURE__ */ React.createElement(FluentCard, {
			elevation: 0,
			classes: t4,
			className: t5
		}, t12);
		$[31] = t12;
		$[32] = t4;
		$[33] = t5;
		$[34] = t13;
	} else t13 = $[34];
	return t13;
};
InfoCard.propTypes = {
	children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
	title: PropTypes.string.isRequired,
	subTitle: PropTypes.string,
	relatedTopics: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
	label: PropTypes.string,
	headerComponent: PropTypes.string,
	subHeaderComponent: PropTypes.string,
	size: PropTypes.oneOf(["standard"])
};
InfoCard.defaultProps = {
	headerComponent: "h2",
	subHeaderComponent: "h3",
	size: "standard"
};
//#endregion
export { InfoCard };

//# sourceMappingURL=InfoCard.mjs.map