import { FluentIconButton } from "../../UI/inputs/buttons/FluentIconButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Card, CardContent, Chip, Divider, Typography, lighten, makeStyles, useTheme } from "@material-ui/core";
import { MapPinIcon } from "@fluentui/react-icons";
//#region src/map-library/ui/TileDisplay.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		flexDirection: "row"
	},
	title: { fontWeight: 700 },
	titleWrapper: { marginBottom: theme.spacing(1) },
	divider: {},
	body: { color: lighten(theme.palette.common.black, .5) },
	actions: {
		marginTop: theme.spacing(1),
		display: "flex",
		flexDirection: "row"
	},
	qty: { marginLeft: theme.spacing(1) }
}));
const TileDisplay = (props) => {
	const $ = c(42);
	const { title, body, selected } = props;
	const classes = useStyles();
	const qty = Math.floor(Math.random() * 10) + 1;
	const theme = useTheme();
	let t0;
	if ($[0] !== theme) {
		t0 = () => /* @__PURE__ */ React.createElement("svg", {
			width: "15",
			height: "10"
		}, /* @__PURE__ */ React.createElement("circle", {
			cx: "70%",
			cy: "50%",
			r: "4",
			fill: theme.palette.success.main
		}));
		$[0] = theme;
		$[1] = t0;
	} else t0 = $[1];
	const Indicator = t0;
	let t1;
	if ($[2] !== selected || $[3] !== theme) {
		t1 = selected && lighten(theme.palette.secondary.main, .9);
		$[2] = selected;
		$[3] = theme;
		$[4] = t1;
	} else t1 = $[4];
	let t2;
	if ($[5] !== t1) {
		t2 = { background: t1 };
		$[5] = t1;
		$[6] = t2;
	} else t2 = $[6];
	let t3;
	if ($[7] !== classes.title || $[8] !== title) {
		t3 = /* @__PURE__ */ React.createElement(Typography, {
			className: classes.title,
			variant: "subtitle"
		}, title);
		$[7] = classes.title;
		$[8] = title;
		$[9] = t3;
	} else t3 = $[9];
	let t4;
	if ($[10] !== classes.titleWrapper || $[11] !== t3) {
		t4 = /* @__PURE__ */ React.createElement("div", { className: classes.titleWrapper }, t3);
		$[10] = classes.titleWrapper;
		$[11] = t3;
		$[12] = t4;
	} else t4 = $[12];
	let t5;
	if ($[13] !== body || $[14] !== classes.body) {
		t5 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, {
			className: classes.body,
			variant: "caption"
		}, body));
		$[13] = body;
		$[14] = classes.body;
		$[15] = t5;
	} else t5 = $[15];
	let t6;
	if ($[16] !== t4 || $[17] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", null, t4, t5);
		$[16] = t4;
		$[17] = t5;
		$[18] = t6;
	} else t6 = $[18];
	let t7;
	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
		t7 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FluentIconButton, {
			color: "primary",
			icon: MapPinIcon
		}));
		$[19] = t7;
	} else t7 = $[19];
	let t8;
	if ($[20] !== classes.root || $[21] !== t6) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t6, t7);
		$[20] = classes.root;
		$[21] = t6;
		$[22] = t8;
	} else t8 = $[22];
	let t9;
	if ($[23] !== Indicator) {
		t9 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Chip, {
			variant: "outlined",
			size: "small",
			label: "Active",
			icon: /* @__PURE__ */ React.createElement(Indicator, null)
		}));
		$[23] = Indicator;
		$[24] = t9;
	} else t9 = $[24];
	let t10;
	if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = /* @__PURE__ */ React.createElement(Chip, {
			variant: "outlined",
			size: "small",
			label: `Qty:${qty}`
		});
		$[25] = t10;
	} else t10 = $[25];
	let t11;
	if ($[26] !== classes.qty) {
		t11 = /* @__PURE__ */ React.createElement("div", { className: classes.qty }, t10);
		$[26] = classes.qty;
		$[27] = t11;
	} else t11 = $[27];
	let t12;
	if ($[28] !== classes.actions || $[29] !== t11 || $[30] !== t9) {
		t12 = /* @__PURE__ */ React.createElement("div", { className: classes.actions }, t9, t11);
		$[28] = classes.actions;
		$[29] = t11;
		$[30] = t9;
		$[31] = t12;
	} else t12 = $[31];
	let t13;
	if ($[32] !== t12 || $[33] !== t8) {
		t13 = /* @__PURE__ */ React.createElement(CardContent, null, t8, t12);
		$[32] = t12;
		$[33] = t8;
		$[34] = t13;
	} else t13 = $[34];
	let t14;
	if ($[35] !== classes.root || $[36] !== t13 || $[37] !== t2) {
		t14 = /* @__PURE__ */ React.createElement(Card, {
			square: true,
			elevation: 0,
			className: classes.root,
			style: t2
		}, t13);
		$[35] = classes.root;
		$[36] = t13;
		$[37] = t2;
		$[38] = t14;
	} else t14 = $[38];
	let t15;
	if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
		t15 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Divider, null));
		$[39] = t15;
	} else t15 = $[39];
	let t16;
	if ($[40] !== t14) {
		t16 = /* @__PURE__ */ React.createElement("div", null, t14, t15);
		$[40] = t14;
		$[41] = t16;
	} else t16 = $[41];
	return t16;
};
//#endregion
export { TileDisplay };

//# sourceMappingURL=TileDisplay.mjs.map