import { c } from "react-compiler-runtime";
import React, { useState } from "react";
import { Divider, Fade, Typography, makeStyles } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/componentSystems/multiThreadTimeline/ui/DateWrapper.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		alignContent: "flex-end",
		cursor: "pointer",
		justifyContent: "center"
	},
	wrapper: { display: "flex" },
	countWrapper: {
		background: "#E9DADB",
		borderRadius: 25,
		padding: 8
	}
}));
const DateWrapper = (t0) => {
	const $ = c(30);
	const { children, months, count } = t0;
	const classes = useStyles();
	const [show, setShow] = useState(true);
	let t1;
	if ($[0] !== months) {
		const MONTHS = {
			1: "Jan",
			2: "Feb",
			3: "March",
			4: "Apr",
			5: "May",
			6: "June",
			7: "July",
			8: "Aug",
			9: "Sept",
			10: "Oct",
			11: "Nov",
			12: "Dec"
		};
		const orderedMonths = [months];
		orderedMonths.sort(_temp);
		t1 = orderedMonths.map(function(i) {
			return MONTHS[i];
		});
		$[0] = months;
		$[1] = t1;
	} else t1 = $[1];
	const output = t1;
	let t2;
	if ($[2] !== show) {
		t2 = () => setShow(!show);
		$[2] = show;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== children || $[5] !== classes.wrapper || $[6] !== show) {
		t3 = show && /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, children, " ");
		$[4] = children;
		$[5] = classes.wrapper;
		$[6] = show;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", null, t3);
		$[8] = t3;
		$[9] = t4;
	} else t4 = $[9];
	let t5;
	if ($[10] !== show || $[11] !== t4) {
		t5 = /* @__PURE__ */ React.createElement(Fade, { in: show }, t4);
		$[10] = show;
		$[11] = t4;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[13] !== classes.countWrapper || $[14] !== count || $[15] !== show) {
		t6 = !show && /* @__PURE__ */ React.createElement("div", { style: {
			height: 165,
			display: "flex",
			justifyContent: "center"
		} }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: classes.countWrapper }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, " + "), count), /* @__PURE__ */ React.createElement("div", { style: {
			height: 123,
			display: "flex",
			justifyContent: "center"
		} }, /* @__PURE__ */ React.createElement(Divider, { orientation: "vertical" }))));
		$[13] = classes.countWrapper;
		$[14] = count;
		$[15] = show;
		$[16] = t6;
	} else t6 = $[16];
	let t7;
	if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = { padding: 4 };
		$[17] = t7;
	} else t7 = $[17];
	let t8;
	if ($[18] !== output) {
		t8 = /* @__PURE__ */ React.createElement("div", { style: t7 }, /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, output, " "));
		$[18] = output;
		$[19] = t8;
	} else t8 = $[19];
	let t9;
	if ($[20] !== t6 || $[21] !== t8) {
		t9 = /* @__PURE__ */ React.createElement("div", null, t6, t8);
		$[20] = t6;
		$[21] = t8;
		$[22] = t9;
	} else t9 = $[22];
	let t10;
	if ($[23] !== classes.root || $[24] !== t9) {
		t10 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t9);
		$[23] = classes.root;
		$[24] = t9;
		$[25] = t10;
	} else t10 = $[25];
	let t11;
	if ($[26] !== t10 || $[27] !== t2 || $[28] !== t5) {
		t11 = /* @__PURE__ */ React.createElement("div", { onClick: t2 }, t5, t10);
		$[26] = t10;
		$[27] = t2;
		$[28] = t5;
		$[29] = t11;
	} else t11 = $[29];
	return t11;
};
DateWrapper.propTypes = {
	children: PropTypes.node,
	date: PropTypes.string,
	months: PropTypes.number,
	count: PropTypes.number
};
function _temp(a, b) {
	return a - b;
}
//#endregion
export { DateWrapper };

//# sourceMappingURL=DateWrapper.mjs.map