import { TimelineHoverCard } from "./TimelineHoverCard.mjs";
import { TimelineStatus } from "./TimelineStatus.mjs";
import { c } from "react-compiler-runtime";
import React, { useState } from "react";
import { Typography, makeStyles } from "@material-ui/core";
import clsx from "clsx";
import PropTypes from "prop-types";
//#region src/componentSystems/multiThreadTimeline/ui/MultiDot.jsx
const useStyles = makeStyles((theme) => ({
	root: { cursor: "pointer" },
	wrapper: {
		width: 130,
		marginBottom: theme.spacing(2)
	}
}));
const MultiDot = (props) => {
	const $ = c(17);
	const { map, number } = props;
	const classes = useStyles(props);
	const { className } = props;
	const [hover, setHover] = useState(false);
	let t0;
	if ($[0] !== className || $[1] !== classes.root) {
		t0 = clsx(classes.root, className);
		$[0] = className;
		$[1] = classes.root;
		$[2] = t0;
	} else t0 = $[2];
	let t1;
	if ($[3] !== hover) {
		t1 = () => setHover(!hover);
		$[3] = hover;
		$[4] = t1;
	} else t1 = $[4];
	let t2;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			paddingLeft: 16,
			paddingRight: 16,
			paddingTop: 10,
			paddingBottom: 10,
			background: "#918296",
			borderRadius: 50,
			color: "white"
		};
		$[5] = t2;
	} else t2 = $[5];
	let t3;
	if ($[6] !== number) {
		t3 = /* @__PURE__ */ React.createElement("div", { style: t2 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, " ", number, " "));
		$[6] = number;
		$[7] = t3;
	} else t3 = $[7];
	let t4;
	if ($[8] !== classes.wrapper || $[9] !== hover || $[10] !== map) {
		t4 = hover && /* @__PURE__ */ React.createElement(TimelineHoverCard, null, map.map((item) => /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, item.details.shortDescription), /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, " ", item.details.date, " "), /* @__PURE__ */ React.createElement(TimelineStatus, { status: item.details.status }))));
		$[8] = classes.wrapper;
		$[9] = hover;
		$[10] = map;
		$[11] = t4;
	} else t4 = $[11];
	let t5;
	if ($[12] !== t0 || $[13] !== t1 || $[14] !== t3 || $[15] !== t4) {
		t5 = /* @__PURE__ */ React.createElement("div", {
			className: t0,
			onMouseDownCapture: t1
		}, t3, t4);
		$[12] = t0;
		$[13] = t1;
		$[14] = t3;
		$[15] = t4;
		$[16] = t5;
	} else t5 = $[16];
	return t5;
};
MultiDot.propTypes = {
	map: PropTypes.arrayOf(PropTypes.shape({ details: PropTypes.shape({
		shortDescription: PropTypes.string.isRequired,
		date: PropTypes.string.isRequired,
		status: PropTypes.string.isRequired
	}).isRequired })).isRequired,
	number: PropTypes.number.isRequired,
	className: PropTypes.string
};
//#endregion
export { MultiDot };

//# sourceMappingURL=MultiDot.mjs.map