import { c } from "react-compiler-runtime";
import React from "react";
import { Box, Card, CardContent, LinearProgress, Typography, makeStyles } from "@material-ui/core";
//#region src/utilities/form/paymentForm/PaymentCard.tsx
const useStyles = makeStyles((theme) => ({
	root: {},
	paper: {
		width: "100%",
		height: "100%",
		position: "relative"
	},
	styleWidth: { width: "75%" },
	media: { height: 120 },
	cardContent: { paddingTop: 0 },
	titleWrapper: {
		display: "flex",
		backgroundColor: (props) => props?.headerColor || "#FFFFFF",
		alignItems: "center"
	},
	loading: {
		position: "absolute",
		top: 0,
		left: 0
	},
	expandMessage: { display: "flex" },
	cardRoot: { "&:last-child": { paddingBottom: theme.spacing(10) } },
	title: { flex: 1 },
	visualization: {
		display: "flex",
		alignItems: "flex-end",
		width: "100%",
		height: 300
	}
}));
const PaymentCard = (props) => {
	const $ = c(17);
	const { title, className, style, loading, headerElement, children } = props;
	const classes = useStyles(props);
	let t0;
	if ($[0] !== style) {
		t0 = {
			border: "none",
			boxShadow: "none",
			borderRadius: 0,
			...style
		};
		$[0] = style;
		$[1] = t0;
	} else t0 = $[1];
	let t1;
	if ($[2] !== classes || $[3] !== headerElement || $[4] !== title) {
		t1 = title && /* @__PURE__ */ React.createElement(CardContent, {
			className: classes.titleWrapper,
			classes: { root: classes.cardRoot }
		}, /* @__PURE__ */ React.createElement(Typography, {
			className: classes.title,
			component: "h2",
			variant: "h6"
		}, title), headerElement && headerElement);
		$[2] = classes;
		$[3] = headerElement;
		$[4] = title;
		$[5] = t1;
	} else t1 = $[5];
	let t2;
	if ($[6] !== loading) {
		t2 = loading && /* @__PURE__ */ React.createElement(Box, { sx: { width: "100%" } }, /* @__PURE__ */ React.createElement(LinearProgress, null));
		$[6] = loading;
		$[7] = t2;
	} else t2 = $[7];
	let t3;
	if ($[8] !== children || $[9] !== className) {
		t3 = /* @__PURE__ */ React.createElement(Box, { className }, children);
		$[8] = children;
		$[9] = className;
		$[10] = t3;
	} else t3 = $[10];
	let t4;
	if ($[11] !== className || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 || $[15] !== t3) {
		t4 = /* @__PURE__ */ React.createElement(Card, {
			className,
			style: t0
		}, t1, t2, t3);
		$[11] = className;
		$[12] = t0;
		$[13] = t1;
		$[14] = t2;
		$[15] = t3;
		$[16] = t4;
	} else t4 = $[16];
	return t4;
};
//#endregion
export { PaymentCard };

//# sourceMappingURL=PaymentCard.mjs.map