import { c } from "react-compiler-runtime";
import React from "react";
import { Chip, makeStyles } from "@material-ui/core";
import clsx from "clsx";
//#region src/UI/dataDisplay/status/StatusChip.jsx
const useStyles = makeStyles((theme) => ({
	smallChip: {
		height: theme.spacing(2.5),
		fontSize: "0.7rem",
		"& .MuiChip-label": {
			paddingLeft: theme.spacing(.75),
			paddingRight: theme.spacing(.75)
		}
	},
	actionable: { cursor: "pointer" },
	success: {
		backgroundColor: theme.palette.success.main,
		color: "#FFF",
		"&.MuiChip-outlined": {
			color: theme.palette.success.main,
			borderColor: theme.palette.success.main,
			backgroundColor: "transparent"
		}
	},
	warning: {
		backgroundColor: theme.palette.warning.main,
		color: "#FFF",
		"&.MuiChip-outlined": {
			color: theme.palette.warning.main,
			borderColor: theme.palette.warning.main,
			backgroundColor: "transparent"
		}
	},
	error: {
		backgroundColor: theme.palette.error.main,
		color: "#FFF",
		"&.MuiChip-outlined": {
			color: theme.palette.error.main,
			borderColor: theme.palette.error.main,
			backgroundColor: "transparent"
		}
	},
	info: {
		backgroundColor: theme.palette.info.main,
		color: theme.palette.getContrastText(theme.palette.info.main),
		"&.MuiChip-outlined": {
			color: theme.palette.info.main,
			borderColor: theme.palette.info.main,
			backgroundColor: "transparent"
		}
	}
}));
const StatusChip = (t0) => {
	const $ = c(19);
	const { status, label, useSmallChip: t1, isActionable: t2, icon, variant: t3, onClick } = t0;
	const useSmallChip = t1 === void 0 ? false : t1;
	const isActionable = t2 === void 0 ? false : t2;
	const variant = t3 === void 0 ? "default" : t3;
	const classes = useStyles();
	const t4 = status === "success";
	const t5 = status === "warning";
	const t6 = status === "error";
	const t7 = status === "info";
	let t8;
	if ($[0] !== classes.actionable || $[1] !== classes.error || $[2] !== classes.info || $[3] !== classes.smallChip || $[4] !== classes.success || $[5] !== classes.warning || $[6] !== isActionable || $[7] !== t4 || $[8] !== t5 || $[9] !== t6 || $[10] !== t7 || $[11] !== useSmallChip) {
		t8 = clsx({
			[classes.smallChip]: useSmallChip,
			[classes.actionable]: isActionable,
			[classes.success]: t4,
			[classes.warning]: t5,
			[classes.error]: t6,
			[classes.info]: t7
		});
		$[0] = classes.actionable;
		$[1] = classes.error;
		$[2] = classes.info;
		$[3] = classes.smallChip;
		$[4] = classes.success;
		$[5] = classes.warning;
		$[6] = isActionable;
		$[7] = t4;
		$[8] = t5;
		$[9] = t6;
		$[10] = t7;
		$[11] = useSmallChip;
		$[12] = t8;
	} else t8 = $[12];
	const chipClass = t8;
	const t9 = icon || null;
	const t10 = isActionable ? onClick : null;
	let t11;
	if ($[13] !== chipClass || $[14] !== label || $[15] !== t10 || $[16] !== t9 || $[17] !== variant) {
		t11 = /* @__PURE__ */ React.createElement(Chip, {
			className: chipClass,
			label,
			size: "small",
			icon: t9,
			variant,
			onClick: t10
		});
		$[13] = chipClass;
		$[14] = label;
		$[15] = t10;
		$[16] = t9;
		$[17] = variant;
		$[18] = t11;
	} else t11 = $[18];
	return t11;
};
//#endregion
export { StatusChip };

//# sourceMappingURL=StatusChip.mjs.map