import { FluentIcon } from "../../../../utilities/iconLibrary/FluentIcon.mjs";
import FluentDisplayNumbers from "../atoms/FluentDisplayNumbers.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Avatar, Typography, makeStyles } from "@material-ui/core";
import { MarketDownIcon, MarketIcon } from "@fluentui/react-icons";
//#region src/UI/widgets/FluentComponents/molecules/FluentStatNumber.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		flexDirection: "row"
	},
	caption: { textAlign: "left" },
	captionSmall: { textAlign: "center" },
	trend: {
		marginTop: theme.spacing(2),
		marginLeft: theme.spacing(1)
	},
	upIcon: { color: "green" },
	downIcon: { color: "#D50000" },
	avatar: { backgroundColor: "white" }
}), { next: "FluentStatNumber" });
const FluentStatNumber = (props) => {
	const $ = c(26);
	const classes = useStyles();
	const { small, trend, label, number } = props;
	const t0 = classes.root;
	let t1;
	if ($[0] !== number) {
		t1 = Math.abs(number);
		$[0] = number;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== small || $[3] !== t1) {
		t2 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FluentDisplayNumbers, {
			small,
			number: t1
		}));
		$[2] = small;
		$[3] = t1;
		$[4] = t2;
	} else t2 = $[4];
	const t3 = !small ? classes.caption : classes.captionSmall;
	let t4;
	if ($[5] !== label) {
		t4 = /* @__PURE__ */ React.createElement(Typography, { variant: "overline" }, label);
		$[5] = label;
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== t3 || $[8] !== t4) {
		t5 = /* @__PURE__ */ React.createElement("div", { className: t3 }, t4);
		$[7] = t3;
		$[8] = t4;
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== t2 || $[11] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", null, t2, t5);
		$[10] = t2;
		$[11] = t5;
		$[12] = t6;
	} else t6 = $[12];
	let t7;
	if ($[13] !== classes.avatar || $[14] !== classes.downIcon || $[15] !== classes.upIcon || $[16] !== small || $[17] !== trend) {
		t7 = small && /* @__PURE__ */ React.createElement(Avatar, { className: classes.avatar }, trend === "down" ? /* @__PURE__ */ React.createElement(FluentIcon, {
			component: MarketDownIcon,
			className: classes.downIcon
		}) : /* @__PURE__ */ React.createElement(FluentIcon, {
			component: MarketIcon,
			className: classes.upIcon
		}));
		$[13] = classes.avatar;
		$[14] = classes.downIcon;
		$[15] = classes.upIcon;
		$[16] = small;
		$[17] = trend;
		$[18] = t7;
	} else t7 = $[18];
	let t8;
	if ($[19] !== classes.trend || $[20] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.trend }, t7);
		$[19] = classes.trend;
		$[20] = t7;
		$[21] = t8;
	} else t8 = $[21];
	let t9;
	if ($[22] !== classes.root || $[23] !== t6 || $[24] !== t8) {
		t9 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t6, t8);
		$[22] = classes.root;
		$[23] = t6;
		$[24] = t8;
		$[25] = t9;
	} else t9 = $[25];
	return t9;
};
//#endregion
export { FluentStatNumber as default };

//# sourceMappingURL=FluentStatNumber.mjs.map