import { c } from "react-compiler-runtime";
import React from "react";
import { Typography, useTheme } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/UI/dataDisplay/typography/StylizedTitle.jsx
const StylizedTitle = (t0) => {
	const $ = c(8);
	const { children, color, component: t1 } = t0;
	const component = t1 === void 0 ? "h2" : t1;
	const theme = useTheme();
	const t2 = `4px solid ${color || theme.palette.secondary.main}`;
	let t3;
	if ($[0] !== t2) {
		t3 = {
			borderLeft: t2,
			paddingLeft: 8
		};
		$[0] = t2;
		$[1] = t3;
	} else t3 = $[1];
	let t4;
	if ($[2] !== children || $[3] !== component) {
		t4 = /* @__PURE__ */ React.createElement(Typography, {
			variant: "h6",
			component
		}, children);
		$[2] = children;
		$[3] = component;
		$[4] = t4;
	} else t4 = $[4];
	let t5;
	if ($[5] !== t3 || $[6] !== t4) {
		t5 = /* @__PURE__ */ React.createElement("div", { style: t3 }, t4);
		$[5] = t3;
		$[6] = t4;
		$[7] = t5;
	} else t5 = $[7];
	return t5;
};
StylizedTitle.propTypes = {
	children: PropTypes.node.isRequired,
	color: PropTypes.string,
	component: PropTypes.string
};
StylizedTitle.defaultProps = { component: "h2" };
//#endregion
export { StylizedTitle };

//# sourceMappingURL=StylizedTitle.mjs.map