import { StatusChip } from "./status/StatusChip.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Divider, Link, Typography, makeStyles } from "@material-ui/core";
import clsx from "clsx";
//#region src/UI/dataDisplay/FluentListElement.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	wrapper: {
		display: "flex",
		flexDirection: "row",
		padding: theme.spacing(1),
		lineHeight: 2
	},
	value: { flex: 1 }
}));
const FluentListElement = (t0) => {
	const $ = c(24);
	const { subject, value, className, status, anchor: t1, href } = t0;
	const anchor = t1 === void 0 ? false : t1;
	const classes = useStyles();
	let t2;
	if ($[0] !== className || $[1] !== classes.root) {
		t2 = clsx(classes.root, className);
		$[0] = className;
		$[1] = classes.root;
		$[2] = t2;
	} else t2 = $[2];
	const t3 = subject && ":";
	let t4;
	if ($[3] !== classes.value || $[4] !== subject || $[5] !== t3) {
		t4 = /* @__PURE__ */ React.createElement(Typography, {
			className: classes.value,
			variant: "body2"
		}, subject, " ", t3);
		$[3] = classes.value;
		$[4] = subject;
		$[5] = t3;
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== status || $[8] !== value) {
		t5 = status && /* @__PURE__ */ React.createElement(StatusChip, {
			status,
			label: value
		});
		$[7] = status;
		$[8] = value;
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] !== anchor || $[11] !== href || $[12] !== status || $[13] !== value) {
		t6 = anchor && href ? /* @__PURE__ */ React.createElement(Link, {
			href,
			variant: "body2",
			underline: "hover",
			target: "_blank",
			rel: "noopener noreferrer"
		}, /* @__PURE__ */ React.createElement("strong", null, value)) : !status ? /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, /* @__PURE__ */ React.createElement("strong", null, value)) : null;
		$[10] = anchor;
		$[11] = href;
		$[12] = status;
		$[13] = value;
		$[14] = t6;
	} else t6 = $[14];
	let t7;
	if ($[15] !== classes.wrapper || $[16] !== t4 || $[17] !== t5 || $[18] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: classes.wrapper }, t4, t5, t6);
		$[15] = classes.wrapper;
		$[16] = t4;
		$[17] = t5;
		$[18] = t6;
		$[19] = t7;
	} else t7 = $[19];
	let t8;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t8 = /* @__PURE__ */ React.createElement(Divider, null);
		$[20] = t8;
	} else t8 = $[20];
	let t9;
	if ($[21] !== t2 || $[22] !== t7) {
		t9 = /* @__PURE__ */ React.createElement("div", { className: t2 }, t7, t8);
		$[21] = t2;
		$[22] = t7;
		$[23] = t9;
	} else t9 = $[23];
	return t9;
};
//#endregion
export { FluentListElement };

//# sourceMappingURL=FluentListElement.mjs.map