import FUIAppHeader from "./FUIAppHeader.mjs";
import FUIAppList from "./FUIAppList.mjs";
import UnityApps from "./UnityApps.mjs";
import ProductAppList from "./ProductAppList.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Divider, Typography, makeStyles, useTheme } from "@material-ui/core";
import { useTranslation } from "react-i18next";
//#region src/shell/ui/appSwitcher/FUIAppSwitcher.jsx
const useStyles = makeStyles((theme) => ({
	card: {
		marginRight: theme.spacing(1.5),
		marginBottom: theme.spacing(1.5)
	},
	content: { padding: theme.spacing(2) },
	appList: { marginTop: theme.spacing(1) },
	list: {
		display: "flex",
		flexDirection: "row",
		flexWrap: "wrap"
	},
	divider: {
		marginTop: theme.spacing(2),
		marginBottom: theme.spacing(2)
	},
	unityBuilders: {},
	title: { marginTop: theme.spacing(2) },
	column: {
		display: "flex",
		flexDirection: "row"
	},
	favorite: {
		display: "flex",
		flexDirection: "row",
		marginTop: theme.spacing(-1)
	}
}));
const FUIAppSwitcher = (props) => {
	const $ = c(48);
	const { onClose, favoriteMenu, builderMenu, appMenu, unityUrl, user, header } = props;
	const classes = useStyles(props);
	const theme = useTheme();
	const appHintColor = theme.palette.primary.light;
	const appColor = theme.palette.primary.main;
	const { t } = useTranslation();
	let t0;
	if ($[0] !== onClose || $[1] !== unityUrl || $[2] !== user) {
		t0 = /* @__PURE__ */ React.createElement(FUIAppHeader, {
			onClose,
			unityUrl,
			user
		});
		$[0] = onClose;
		$[1] = unityUrl;
		$[2] = user;
		$[3] = t0;
	} else t0 = $[3];
	let t1;
	if ($[4] !== appColor || $[5] !== appHintColor || $[6] !== appMenu || $[7] !== classes.divider || $[8] !== classes.title || $[9] !== t || $[10] !== user) {
		t1 = appMenu?.length ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
			variant: "h6",
			className: classes.title
		}, t("Unity Apps")), /* @__PURE__ */ React.createElement(UnityApps, {
			backgroundColor: appHintColor,
			children: /* @__PURE__ */ React.createElement(ProductAppList, {
				apps: appMenu,
				color: appColor,
				user
			})
		}), /* @__PURE__ */ React.createElement(Divider, { className: classes.divider })) : null;
		$[4] = appColor;
		$[5] = appHintColor;
		$[6] = appMenu;
		$[7] = classes.divider;
		$[8] = classes.title;
		$[9] = t;
		$[10] = user;
		$[11] = t1;
	} else t1 = $[11];
	let t2;
	if ($[12] !== appColor || $[13] !== builderMenu || $[14] !== classes.divider || $[15] !== classes.title || $[16] !== classes.unityBuilders || $[17] !== onClose || $[18] !== t || $[19] !== user) {
		t2 = builderMenu?.length ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
			variant: "h6",
			className: classes.title
		}, t("Unity Builders")), /* @__PURE__ */ React.createElement("div", { className: classes.unityBuilders }, /* @__PURE__ */ React.createElement(FUIAppList, {
			apps: builderMenu,
			verticalColor: appColor,
			closeSwitcher: onClose,
			user
		})), /* @__PURE__ */ React.createElement(Divider, { className: classes.divider }), " ") : null;
		$[12] = appColor;
		$[13] = builderMenu;
		$[14] = classes.divider;
		$[15] = classes.title;
		$[16] = classes.unityBuilders;
		$[17] = onClose;
		$[18] = t;
		$[19] = user;
		$[20] = t2;
	} else t2 = $[20];
	let t3;
	if ($[21] !== appColor || $[22] !== classes.favorite || $[23] !== classes.title || $[24] !== favoriteMenu || $[25] !== onClose || $[26] !== t || $[27] !== user) {
		t3 = favoriteMenu?.length ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
			variant: "h6",
			className: classes.title
		}, t("Favorites")), /* @__PURE__ */ React.createElement("div", { className: classes.favorite }, /* @__PURE__ */ React.createElement(FUIAppList, {
			apps: favoriteMenu,
			verticalColor: appColor,
			closeSwitcher: onClose,
			user
		}))) : null;
		$[21] = appColor;
		$[22] = classes.favorite;
		$[23] = classes.title;
		$[24] = favoriteMenu;
		$[25] = onClose;
		$[26] = t;
		$[27] = user;
		$[28] = t3;
	} else t3 = $[28];
	let t4;
	if ($[29] !== classes.appList || $[30] !== header || $[31] !== t1 || $[32] !== t2 || $[33] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.appList }, header, t1, t2, t3);
		$[29] = classes.appList;
		$[30] = header;
		$[31] = t1;
		$[32] = t2;
		$[33] = t3;
		$[34] = t4;
	} else t4 = $[34];
	let t5;
	if ($[35] !== classes.right || $[36] !== t4) {
		t5 = /* @__PURE__ */ React.createElement("div", { className: classes.right }, t4);
		$[35] = classes.right;
		$[36] = t4;
		$[37] = t5;
	} else t5 = $[37];
	let t6;
	if ($[38] !== classes.column || $[39] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: classes.column }, t5);
		$[38] = classes.column;
		$[39] = t5;
		$[40] = t6;
	} else t6 = $[40];
	let t7;
	if ($[41] !== classes.content || $[42] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: classes.content }, t6);
		$[41] = classes.content;
		$[42] = t6;
		$[43] = t7;
	} else t7 = $[43];
	let t8;
	if ($[44] !== classes.root || $[45] !== t0 || $[46] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t0, t7);
		$[44] = classes.root;
		$[45] = t0;
		$[46] = t7;
		$[47] = t8;
	} else t8 = $[47];
	return t8;
};
//#endregion
export { FUIAppSwitcher as default };

//# sourceMappingURL=FUIAppSwitcher.mjs.map