import { FluentCard } from "./fluentCards/FluentCard.mjs";
import { c } from "react-compiler-runtime";
import React, { useEffect, useState } from "react";
import { Avatar, CardContent, Chip, Divider, Typography, lighten, makeStyles } from "@material-ui/core";
import clsx from "clsx";
import { CheckMarkIcon } from "@fluentui/react-icons";
//#region src/UI/surfaces/cards/BioCard.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		width: "100%",
		height: "100%"
	},
	large: {
		width: theme.spacing(12),
		height: theme.spacing(12),
		border: `3px solid ${theme.palette.primary.main}`
	},
	info: {
		display: "flex",
		marginTop: theme.spacing(3)
	},
	header: { display: "flex" },
	addressContainer: {
		maxWidth: theme.spacing(16),
		alignContent: "center",
		marginLeft: theme.spacing(3),
		marginBottom: theme.spacing(3)
	},
	lastName: { marginTop: theme.spacing(-1) },
	name: { flex: 1 },
	chip: { background: lighten(theme.palette.success.light, .7) }
}));
const BioCard = (t0) => {
	const $ = c(52);
	const { children, avatar, alt, firstName, lastName, address, copy, className } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			value: "",
			copied: false
		};
		$[0] = t1;
	} else t1 = $[0];
	const [state, setState] = useState(t1);
	let t2;
	let t3;
	if ($[1] !== copy) {
		t2 = () => {
			setState({ value: copy });
		};
		t3 = [copy];
		$[1] = copy;
		$[2] = t2;
		$[3] = t3;
	} else {
		t2 = $[2];
		t3 = $[3];
	}
	useEffect(t2, t3);
	let t4;
	if ($[4] !== className || $[5] !== classes.root) {
		t4 = clsx(classes.root, className);
		$[4] = className;
		$[5] = classes.root;
		$[6] = t4;
	} else t4 = $[6];
	let t5;
	if ($[7] !== firstName) {
		t5 = /* @__PURE__ */ React.createElement(Typography, { variant: "h4" }, firstName, " ");
		$[7] = firstName;
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== classes.overline || $[10] !== lastName) {
		t6 = /* @__PURE__ */ React.createElement(Typography, {
			className: classes.overline,
			variant: "overline"
		}, lastName);
		$[9] = classes.overline;
		$[10] = lastName;
		$[11] = t6;
	} else t6 = $[11];
	let t7;
	if ($[12] !== classes.lastName || $[13] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: classes.lastName }, t6);
		$[12] = classes.lastName;
		$[13] = t6;
		$[14] = t7;
	} else t7 = $[14];
	let t8;
	if ($[15] !== classes.name || $[16] !== t5 || $[17] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: classes.name }, t5, t7);
		$[15] = classes.name;
		$[16] = t5;
		$[17] = t7;
		$[18] = t8;
	} else t8 = $[18];
	let t9;
	if ($[19] !== classes.chip || $[20] !== state.copied) {
		t9 = state.copied && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Chip, {
			label: "Copied",
			avatar: /* @__PURE__ */ React.createElement(CheckMarkIcon, null),
			variant: "outlined",
			className: classes.chip,
			size: "small"
		}));
		$[19] = classes.chip;
		$[20] = state.copied;
		$[21] = t9;
	} else t9 = $[21];
	let t10;
	if ($[22] !== classes.header || $[23] !== t8 || $[24] !== t9) {
		t10 = /* @__PURE__ */ React.createElement("div", { className: classes.header }, t8, t9);
		$[22] = classes.header;
		$[23] = t8;
		$[24] = t9;
		$[25] = t10;
	} else t10 = $[25];
	let t11;
	if ($[26] !== alt || $[27] !== avatar || $[28] !== classes.large) {
		t11 = /* @__PURE__ */ React.createElement(Avatar, {
			className: classes.large,
			alt,
			src: avatar
		});
		$[26] = alt;
		$[27] = avatar;
		$[28] = classes.large;
		$[29] = t11;
	} else t11 = $[29];
	let t12;
	if ($[30] !== classes.avatarWrapper || $[31] !== t11) {
		t12 = /* @__PURE__ */ React.createElement("div", { className: classes.avatarWrapper }, t11);
		$[30] = classes.avatarWrapper;
		$[31] = t11;
		$[32] = t12;
	} else t12 = $[32];
	let t13;
	if ($[33] !== address || $[34] !== classes.addressContainer) {
		t13 = /* @__PURE__ */ React.createElement("div", { className: classes.addressContainer }, address);
		$[33] = address;
		$[34] = classes.addressContainer;
		$[35] = t13;
	} else t13 = $[35];
	let t14;
	if ($[36] !== classes.info || $[37] !== t12 || $[38] !== t13) {
		t14 = /* @__PURE__ */ React.createElement("div", { className: classes.info }, t12, t13);
		$[36] = classes.info;
		$[37] = t12;
		$[38] = t13;
		$[39] = t14;
	} else t14 = $[39];
	let t15;
	if ($[40] !== t10 || $[41] !== t14) {
		t15 = /* @__PURE__ */ React.createElement(CardContent, null, t10, t14);
		$[40] = t10;
		$[41] = t14;
		$[42] = t15;
	} else t15 = $[42];
	let t16;
	if ($[43] !== children) {
		t16 = children && /* @__PURE__ */ React.createElement(Divider, null);
		$[43] = children;
		$[44] = t16;
	} else t16 = $[44];
	let t17;
	if ($[45] !== children) {
		t17 = /* @__PURE__ */ React.createElement(CardContent, null, children);
		$[45] = children;
		$[46] = t17;
	} else t17 = $[46];
	let t18;
	if ($[47] !== t15 || $[48] !== t16 || $[49] !== t17 || $[50] !== t4) {
		t18 = /* @__PURE__ */ React.createElement(FluentCard, { className: t4 }, t15, t16, t17);
		$[47] = t15;
		$[48] = t16;
		$[49] = t17;
		$[50] = t4;
		$[51] = t18;
	} else t18 = $[51];
	return t18;
};
//#endregion
export { BioCard };

//# sourceMappingURL=BioCard.mjs.map