import { UnityFluentIcon } from "../../../utilities/iconLibrary/UnityFluentIcon.mjs";
import { getIconFromName } from "../../../utilities/tree/TreeUtilities.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Avatar, Typography, alpha, makeStyles } from "@material-ui/core";
//#region src/UI/timeline/fluentTimeline/FluentTimelineHeader.jsx
const useStyles = makeStyles((theme) => ({
	customTimelineHeader: {
		backgroundColor: alpha(theme.palette.secondary.main, .1),
		borderRadius: theme.spacing(4),
		padding: theme.spacing(.5, 2, .5, .5),
		display: "flex",
		alignItems: "center"
	},
	customTimelineHeaderAvatar: {
		marginRight: theme.spacing(1),
		height: theme.spacing(4),
		width: theme.spacing(4)
	},
	flexDescription: {
		fontSize: "0.875rem",
		marginLeft: theme.spacing(2)
	}
}));
const FluentTimelineHeader = (props) => {
	const $ = c(17);
	const { title, date, iconName } = props;
	const classes = useStyles();
	const t0 = classes.customTimelineHeader;
	const t1 = classes.customTimelineHeaderAvatar;
	const t2 = iconName ?? "PageListIcon";
	let t3;
	if ($[0] !== t2) {
		t3 = getIconFromName(t2);
		$[0] = t2;
		$[1] = t3;
	} else t3 = $[1];
	let t4;
	if ($[2] !== t3) {
		t4 = /* @__PURE__ */ React.createElement(UnityFluentIcon, {
			size: "medium",
			icon: t3,
			type: ""
		});
		$[2] = t3;
		$[3] = t4;
	} else t4 = $[3];
	let t5;
	if ($[4] !== classes.customTimelineHeaderAvatar || $[5] !== t4) {
		t5 = /* @__PURE__ */ React.createElement(Avatar, { className: t1 }, t4);
		$[4] = classes.customTimelineHeaderAvatar;
		$[5] = t4;
		$[6] = t5;
	} else t5 = $[6];
	let t6;
	if ($[7] !== title) {
		t6 = /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, title);
		$[7] = title;
		$[8] = t6;
	} else t6 = $[8];
	let t7;
	if ($[9] !== classes.flexDescription || $[10] !== date) {
		t7 = /* @__PURE__ */ React.createElement(Typography, {
			variant: "caption",
			color: "textSecondary",
			className: classes.flexDescription
		}, date);
		$[9] = classes.flexDescription;
		$[10] = date;
		$[11] = t7;
	} else t7 = $[11];
	let t8;
	if ($[12] !== classes.customTimelineHeader || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t5, t6, t7);
		$[12] = classes.customTimelineHeader;
		$[13] = t5;
		$[14] = t6;
		$[15] = t7;
		$[16] = t8;
	} else t8 = $[16];
	return t8;
};
//#endregion
export { FluentTimelineHeader };

//# sourceMappingURL=FluentTimelineHeader.mjs.map