import { c } from "react-compiler-runtime";
import React from "react";
import { LinearProgress } from "@material-ui/core";
import clsx from "clsx";
import { makeStyles as makeStyles$1 } from "@material-ui/core/styles";
//#region src/UI/loading/LinearProgress.jsx
const useStyles = makeStyles$1((theme) => ({
	root: { backgroundColor: theme.palette.grey[300] },
	barColorPrimary: { backgroundColor: theme.palette.primary.main },
	barColorSecondary: { backgroundColor: theme.palette.secondary.main },
	barColorSuccess: { backgroundColor: theme.palette.success.main },
	barColorError: { backgroundColor: theme.palette.error.main },
	barColorWarning: { backgroundColor: theme.palette.warning.main },
	barColorInfo: { backgroundColor: theme.palette.info.main },
	customColorBar: (props) => ({ backgroundColor: props.color })
}));
const LinearProgress$1 = (props) => {
	const $ = c(31);
	let otherProps;
	let t0;
	let t1;
	let value;
	if ($[0] !== props) {
		({variant: t0, value, color: t1, ...otherProps} = props);
		$[0] = props;
		$[1] = otherProps;
		$[2] = t0;
		$[3] = t1;
		$[4] = value;
	} else {
		otherProps = $[1];
		t0 = $[2];
		t1 = $[3];
		value = $[4];
	}
	const variant = t0 === void 0 ? "indeterminate" : t0;
	const color = t1 === void 0 ? "primary" : t1;
	let t2;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = [
			"primary",
			"secondary",
			"success",
			"error",
			"warning",
			"info"
		];
		$[5] = t2;
	} else t2 = $[5];
	const isPredefinedColor = t2.includes(color);
	let t3;
	if ($[6] !== color) {
		t3 = { color };
		$[6] = color;
		$[7] = t3;
	} else t3 = $[7];
	const classes = useStyles(t3);
	const t4 = classes.root;
	const t5 = color === "primary";
	const t6 = color === "secondary";
	const t7 = color === "success";
	const t8 = color === "error";
	const t9 = color === "warning";
	const t10 = color === "info";
	const t11 = !isPredefinedColor;
	let t12;
	if ($[8] !== classes.barColorError || $[9] !== classes.barColorInfo || $[10] !== classes.barColorPrimary || $[11] !== classes.barColorSecondary || $[12] !== classes.barColorSuccess || $[13] !== classes.barColorWarning || $[14] !== classes.customColorBar || $[15] !== t10 || $[16] !== t11 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9) {
		t12 = clsx({
			[classes.barColorPrimary]: t5,
			[classes.barColorSecondary]: t6,
			[classes.barColorSuccess]: t7,
			[classes.barColorError]: t8,
			[classes.barColorWarning]: t9,
			[classes.barColorInfo]: t10,
			[classes.customColorBar]: t11
		});
		$[8] = classes.barColorError;
		$[9] = classes.barColorInfo;
		$[10] = classes.barColorPrimary;
		$[11] = classes.barColorSecondary;
		$[12] = classes.barColorSuccess;
		$[13] = classes.barColorWarning;
		$[14] = classes.customColorBar;
		$[15] = t10;
		$[16] = t11;
		$[17] = t5;
		$[18] = t6;
		$[19] = t7;
		$[20] = t8;
		$[21] = t9;
		$[22] = t12;
	} else t12 = $[22];
	let t13;
	if ($[23] !== classes.root || $[24] !== t12) {
		t13 = {
			root: t4,
			bar: t12
		};
		$[23] = classes.root;
		$[24] = t12;
		$[25] = t13;
	} else t13 = $[25];
	let t14;
	if ($[26] !== otherProps || $[27] !== t13 || $[28] !== value || $[29] !== variant) {
		t14 = /* @__PURE__ */ React.createElement(LinearProgress, {
			...otherProps,
			variant,
			value,
			classes: t13
		});
		$[26] = otherProps;
		$[27] = t13;
		$[28] = value;
		$[29] = variant;
		$[30] = t14;
	} else t14 = $[30];
	return t14;
};
//#endregion
export { LinearProgress$1 as LinearProgress };

//# sourceMappingURL=LinearProgress.mjs.map