import { FluentIcon } from "../../../utilities/iconLibrary/FluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React, { forwardRef } from "react";
import { IconButton, Tooltip, makeStyles } from "@material-ui/core";
import { ChevronDownIcon } from "@fluentui/react-icons";
import PropTypes from "prop-types";
//#region src/UI/inputs/buttons/AmbientTokenButton.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	actionHeader: {
		display: "flex",
		flexDirection: "row"
	},
	icon: {
		background: theme.palette.common.white,
		padding: theme.spacing(1),
		color: theme.palette.secondary.main
	}
}));
const AmbientTokenButton = forwardRef(function AmbientTokenButton(props, ref) {
	const $ = c(19);
	const { tooltip, ariaLabel, onClick, size, icon: t0, iconClassName, otherProps, id: t1, udprecordid } = props;
	const icon = t0 === void 0 ? ChevronDownIcon : t0;
	const id = t1 === void 0 ? "token-button" : t1;
	const classes = useStyles(props);
	const t2 = iconClassName ?? classes.icon;
	const t3 = size ?? "small";
	let t4;
	if ($[0] !== classes.iconButtonStyle || $[1] !== icon) {
		t4 = /* @__PURE__ */ React.createElement(FluentIcon, {
			className: classes.iconButtonStyle,
			component: icon
		});
		$[0] = classes.iconButtonStyle;
		$[1] = icon;
		$[2] = t4;
	} else t4 = $[2];
	let t5;
	if ($[3] !== ariaLabel || $[4] !== id || $[5] !== onClick || $[6] !== otherProps || $[7] !== ref || $[8] !== t2 || $[9] !== t3 || $[10] !== t4 || $[11] !== udprecordid) {
		t5 = /* @__PURE__ */ React.createElement(IconButton, {
			id,
			udprecordid,
			ref,
			"aria-label": ariaLabel,
			className: t2,
			size: t3,
			onClick,
			...otherProps
		}, t4);
		$[3] = ariaLabel;
		$[4] = id;
		$[5] = onClick;
		$[6] = otherProps;
		$[7] = ref;
		$[8] = t2;
		$[9] = t3;
		$[10] = t4;
		$[11] = udprecordid;
		$[12] = t5;
	} else t5 = $[12];
	let t6;
	if ($[13] !== t5 || $[14] !== tooltip) {
		t6 = /* @__PURE__ */ React.createElement(Tooltip, { title: tooltip }, t5);
		$[13] = t5;
		$[14] = tooltip;
		$[15] = t6;
	} else t6 = $[15];
	let t7;
	if ($[16] !== classes.root || $[17] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t6);
		$[16] = classes.root;
		$[17] = t6;
		$[18] = t7;
	} else t7 = $[18];
	return t7;
});
AmbientTokenButton.propTypes = {
	tooltip: PropTypes.string.isRequired,
	ariaLabel: PropTypes.string.isRequired,
	onClick: PropTypes.func,
	icon: PropTypes.func.isRequired
};
//#endregion
export { AmbientTokenButton };

//# sourceMappingURL=AmbientTokenButton.mjs.map