import { FluentIcon } from "../../../utilities/iconLibrary/FluentIcon.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { IconButton, Tooltip, makeStyles } from "@material-ui/core";
//#region src/UI/inputs/buttons/IconButtonWithToolTip.jsx
const useStyles = makeStyles(() => ({ root: { "&.Mui-disabled": { pointerEvents: "auto" } } }));
const IconButtonWithTooltip = (t0) => {
	const $ = c(27);
	let className;
	let disabled;
	let fluentIconClassName;
	let icon;
	let id;
	let onClick;
	let other;
	let title;
	let udprecordid;
	if ($[0] !== t0) {
		({icon, title, disabled, onClick, className, fluentIconClassName, id, udprecordid, ...other} = t0);
		$[0] = t0;
		$[1] = className;
		$[2] = disabled;
		$[3] = fluentIconClassName;
		$[4] = icon;
		$[5] = id;
		$[6] = onClick;
		$[7] = other;
		$[8] = title;
		$[9] = udprecordid;
	} else {
		className = $[1];
		disabled = $[2];
		fluentIconClassName = $[3];
		icon = $[4];
		id = $[5];
		onClick = $[6];
		other = $[7];
		title = $[8];
		udprecordid = $[9];
	}
	const t1 = disabled ? "div" : void 0;
	const t2 = disabled ? void 0 : onClick;
	let t3;
	if ($[10] !== disabled || $[11] !== t1 || $[12] !== t2) {
		t3 = {
			disabled,
			component: t1,
			onClick: t2
		};
		$[10] = disabled;
		$[11] = t1;
		$[12] = t2;
		$[13] = t3;
	} else t3 = $[13];
	const adjustedButtonProps = t3;
	const classes = useStyles();
	const t4 = `${className} ${classes.root}`;
	let t5;
	if ($[14] !== fluentIconClassName || $[15] !== icon) {
		t5 = /* @__PURE__ */ React.createElement(FluentIcon, {
			className: fluentIconClassName,
			component: icon
		});
		$[14] = fluentIconClassName;
		$[15] = icon;
		$[16] = t5;
	} else t5 = $[16];
	let t6;
	if ($[17] !== adjustedButtonProps || $[18] !== id || $[19] !== other || $[20] !== t4 || $[21] !== t5 || $[22] !== udprecordid) {
		t6 = /* @__PURE__ */ React.createElement(IconButton, {
			id,
			udprecordid,
			className: t4,
			...other,
			...adjustedButtonProps
		}, t5);
		$[17] = adjustedButtonProps;
		$[18] = id;
		$[19] = other;
		$[20] = t4;
		$[21] = t5;
		$[22] = udprecordid;
		$[23] = t6;
	} else t6 = $[23];
	let t7;
	if ($[24] !== t6 || $[25] !== title) {
		t7 = /* @__PURE__ */ React.createElement(Tooltip, { title }, t6);
		$[24] = t6;
		$[25] = title;
		$[26] = t7;
	} else t7 = $[26];
	return t7;
};
//#endregion
export { IconButtonWithTooltip };

//# sourceMappingURL=IconButtonWithToolTip.mjs.map