import { IconRenderer } from "../../../UI/templates/ui/renderers/IconRenderer.mjs";
import { TimelineToggleButton } from "./TimelineToggleButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/componentSystems/multiThreadTimeline/ui/TimelineTopRowFilter.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	menu: {
		marginTop: 10,
		marginRight: 8,
		marginBottom: 20
	}
}));
const TimelineTopRowFilter = (t0) => {
	const $ = c(10);
	const { filterCall, filterListGroup, off } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = { display: "flex" };
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== filterCall || $[2] !== filterListGroup || $[3] !== off) {
		t2 = filterListGroup && filterListGroup.map((item) => /* @__PURE__ */ React.createElement(TimelineToggleButton, {
			title: item.name,
			timelineItem: item.name,
			handleClick: () => filterCall(item.name),
			off,
			icon: /* @__PURE__ */ React.createElement(IconRenderer, {
				noBorder: true,
				value: {
					color: { hex: "#" + item.color },
					name: item.icon
				}
			})
		}));
		$[1] = filterCall;
		$[2] = filterListGroup;
		$[3] = off;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { style: t1 }, t2)));
		$[5] = t2;
		$[6] = t3;
	} else t3 = $[6];
	let t4;
	if ($[7] !== classes.root || $[8] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t3);
		$[7] = classes.root;
		$[8] = t3;
		$[9] = t4;
	} else t4 = $[9];
	return t4;
};
TimelineTopRowFilter.propTypes = {
	filterList: PropTypes.array,
	filterCall: PropTypes.func,
	filterListGroup: PropTypes.array,
	off: PropTypes.bool,
	clear: PropTypes.func
};
//#endregion
export { TimelineTopRowFilter };

//# sourceMappingURL=TimelineTopRowFilter.mjs.map