import { FluentIconButton } from "../../inputs/buttons/FluentIconButton.mjs";
import { StatusChip } from "../status/StatusChip.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Divider, Typography, makeStyles } from "@material-ui/core";
import { ArrowUpRightIcon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/dataDisplay/ticketCard/StatusLineItem.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		width: "100%",
		height: 44
	},
	wrapper: { display: "flex" },
	labelCount: {
		flex: 1,
		display: "flex"
	},
	status: { marginRight: theme.spacing(1) },
	icon: { marginRight: theme.spacing(1) }
}));
const StatusLineItem = (t0) => {
	const $ = c(28);
	const { label, amount, status, icon, handleClick } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] !== classes.icon || $[1] !== icon) {
		t1 = /* @__PURE__ */ React.createElement("div", { className: classes.icon }, " ", icon, " ");
		$[0] = classes.icon;
		$[1] = icon;
		$[2] = t1;
	} else t1 = $[2];
	let t2;
	if ($[3] !== label) {
		t2 = /* @__PURE__ */ React.createElement(Typography, null, " ", label, " ");
		$[3] = label;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== classes.labelCount || $[6] !== t1 || $[7] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: classes.labelCount }, t1, t2);
		$[5] = classes.labelCount;
		$[6] = t1;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	let t4;
	if ($[9] !== amount || $[10] !== status) {
		t4 = status === "error" && /* @__PURE__ */ React.createElement(StatusChip, {
			label: amount,
			status
		});
		$[9] = amount;
		$[10] = status;
		$[11] = t4;
	} else t4 = $[11];
	const t5 = status !== "error" && amount;
	let t6;
	if ($[12] !== classes.status || $[13] !== t4 || $[14] !== t5) {
		t6 = /* @__PURE__ */ React.createElement("div", { className: classes.status }, t4, t5);
		$[12] = classes.status;
		$[13] = t4;
		$[14] = t5;
		$[15] = t6;
	} else t6 = $[15];
	let t7;
	if ($[16] !== classes.launch || $[17] !== handleClick) {
		t7 = /* @__PURE__ */ React.createElement(FluentIconButton, {
			onClick: handleClick,
			className: classes.launch,
			icon: ArrowUpRightIcon,
			"aria-label": "launch"
		});
		$[16] = classes.launch;
		$[17] = handleClick;
		$[18] = t7;
	} else t7 = $[18];
	let t8;
	if ($[19] !== classes.wrapper || $[20] !== t3 || $[21] !== t6 || $[22] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, t3, t6, t7);
		$[19] = classes.wrapper;
		$[20] = t3;
		$[21] = t6;
		$[22] = t7;
		$[23] = t8;
	} else t8 = $[23];
	let t9;
	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = /* @__PURE__ */ React.createElement(Divider, null);
		$[24] = t9;
	} else t9 = $[24];
	let t10;
	if ($[25] !== classes.root || $[26] !== t8) {
		t10 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t8, t9);
		$[25] = classes.root;
		$[26] = t8;
		$[27] = t10;
	} else t10 = $[27];
	return t10;
};
StatusLineItem.propTypes = {
	label: PropTypes.string.isRequired,
	amount: PropTypes.number,
	status: PropTypes.string,
	icon: PropTypes.node,
	handleClick: PropTypes.func
};
//#endregion
export { StatusLineItem };

//# sourceMappingURL=StatusLineItem.mjs.map