import { StandardTitle } from "../../dataDisplay/typography/StandardTitle.mjs";
import { FluentSimpleTab } from "../../navigation/tabs/defaultTabs/FluentSimpleTab.mjs";
import { FluentSimpleTabs } from "../../navigation/tabs/defaultTabs/FluentSimpleTabs.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
//#region src/UI/utilityDisplay/utilityHeader/UtilityTabHeader.jsx
function a11yProps(index) {
	return {
		id: `simple-tab-${index}`,
		"aria-controls": `simple-tabpanel-${index}`
	};
}
const useStyles = makeStyles((theme) => ({
	root: {
		flexGrow: 1,
		marginTop: 12
	},
	title: { margin: theme.spacing(2) },
	titleWrapper: { paddingLeft: theme.spacing(2) }
}));
const UtilityTabHeader = (t0) => {
	const $ = c(15);
	const { handleChange, value, tabList, title: t1 } = t0;
	const title = t1 === void 0 ? "Page title" : t1;
	const classes = useStyles();
	let t2;
	if ($[0] !== title) {
		t2 = /* @__PURE__ */ React.createElement(StandardTitle, null, title);
		$[0] = title;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] !== classes.titleWrapper || $[3] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.titleWrapper }, t2);
		$[2] = classes.titleWrapper;
		$[3] = t2;
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== tabList) {
		t4 = tabList && tabList.map(_temp);
		$[5] = tabList;
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== handleChange || $[8] !== t4 || $[9] !== value) {
		t5 = /* @__PURE__ */ React.createElement(FluentSimpleTabs, {
			value,
			onChange: handleChange
		}, t4);
		$[7] = handleChange;
		$[8] = t4;
		$[9] = value;
		$[10] = t5;
	} else t5 = $[10];
	let t6;
	if ($[11] !== classes.root || $[12] !== t3 || $[13] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t3, t5);
		$[11] = classes.root;
		$[12] = t3;
		$[13] = t5;
		$[14] = t6;
	} else t6 = $[14];
	return t6;
};
function _temp(item, index) {
	return /* @__PURE__ */ React.createElement(FluentSimpleTab, {
		key: item.label,
		label: item.label,
		...a11yProps(index)
	});
}
//#endregion
export { UtilityTabHeader };

//# sourceMappingURL=UtilityTabHeader.mjs.map