import { FluentIcon } from "./FluentIcon.mjs";
import { UnityIcon } from "./UnityIcon.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Button, Divider, Paper, Typography, makeStyles } from "@material-ui/core";
import clsx from "clsx";
//#region src/utilities/iconLibrary/SelectedLibraryItem.jsx
const useStyles = makeStyles((theme) => ({
	root: { width: 320 },
	item: {
		width: 180,
		height: 180
	},
	container: {
		display: "flex",
		flexDirection: "column",
		alignItems: "center",
		justifyContent: "center"
	},
	button: { marginTop: theme.spacing(2) },
	images: {
		height: theme.spacing(100),
		width: theme.spacing(100)
	},
	divider: { marginBottom: theme.spacing(2) }
}));
const SelectedLibraryItem = (props) => {
	const $ = c(41);
	const classes = useStyles();
	const { addItem, item, title } = props;
	const t0 = classes.root;
	let t1;
	if ($[0] !== title) {
		t1 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, { variant: "overline" }, title));
		$[0] = title;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = /* @__PURE__ */ React.createElement(Divider, null);
		$[2] = t2;
	} else t2 = $[2];
	let t3;
	if ($[3] !== classes.divider) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.divider }, t2);
		$[3] = classes.divider;
		$[4] = t3;
	} else t3 = $[4];
	const t4 = classes.container;
	let t5;
	if ($[5] !== classes.container || $[6] !== classes.item) {
		t5 = clsx(classes.item, classes.container);
		$[5] = classes.container;
		$[6] = classes.item;
		$[7] = t5;
	} else t5 = $[7];
	let t6;
	if ($[8] !== item.icon || $[9] !== item.type) {
		t6 = item.type === "unity" ? /* @__PURE__ */ React.createElement(UnityIcon, {
			component: item.icon,
			size: "showcase"
		}) : /* @__PURE__ */ React.createElement(FluentIcon, {
			component: item.icon,
			size: "showcase"
		});
		$[8] = item.icon;
		$[9] = item.type;
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== t5 || $[12] !== t6) {
		t7 = /* @__PURE__ */ React.createElement(Paper, {
			variant: "outlined",
			className: t5
		}, t6);
		$[11] = t5;
		$[12] = t6;
		$[13] = t7;
	} else t7 = $[13];
	let t8;
	if ($[14] !== item.label) {
		t8 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, null, item.label));
		$[14] = item.label;
		$[15] = t8;
	} else t8 = $[15];
	let t9;
	if ($[16] !== addItem || $[17] !== item) {
		t9 = () => addItem(item);
		$[16] = addItem;
		$[17] = item;
		$[18] = t9;
	} else t9 = $[18];
	let t10;
	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = { textTransform: "none" };
		$[19] = t10;
	} else t10 = $[19];
	let t11;
	if ($[20] !== t9 || $[21] !== title) {
		t11 = /* @__PURE__ */ React.createElement(Button, {
			variant: "outlined",
			onClick: t9,
			style: t10
		}, title);
		$[20] = t9;
		$[21] = title;
		$[22] = t11;
	} else t11 = $[22];
	let t12;
	if ($[23] !== classes.button || $[24] !== t11) {
		t12 = /* @__PURE__ */ React.createElement("div", { className: classes.button }, t11);
		$[23] = classes.button;
		$[24] = t11;
		$[25] = t12;
	} else t12 = $[25];
	let t13;
	if ($[26] !== classes.container || $[27] !== t12 || $[28] !== t8) {
		t13 = /* @__PURE__ */ React.createElement("div", { className: classes.container }, t8, t12);
		$[26] = classes.container;
		$[27] = t12;
		$[28] = t8;
		$[29] = t13;
	} else t13 = $[29];
	let t14;
	if ($[30] !== t13 || $[31] !== t7) {
		t14 = /* @__PURE__ */ React.createElement("div", null, t7, t13);
		$[30] = t13;
		$[31] = t7;
		$[32] = t14;
	} else t14 = $[32];
	let t15;
	if ($[33] !== classes.container || $[34] !== t14) {
		t15 = /* @__PURE__ */ React.createElement("div", { className: t4 }, t14);
		$[33] = classes.container;
		$[34] = t14;
		$[35] = t15;
	} else t15 = $[35];
	let t16;
	if ($[36] !== classes.root || $[37] !== t1 || $[38] !== t15 || $[39] !== t3) {
		t16 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t1, t3, t15);
		$[36] = classes.root;
		$[37] = t1;
		$[38] = t15;
		$[39] = t3;
		$[40] = t16;
	} else t16 = $[40];
	return t16;
};
//#endregion
export { SelectedLibraryItem as default };

//# sourceMappingURL=SelectedLibraryItem.mjs.map