import { fixDecimalsAmount as e } from "../../functions/utils/amounts.utils.mjs";
import "../error-codes.constants.mjs";
import { getAmountInToken as t } from "../../functions/web3/etherFunctions.mjs";
import "./FeeOverTransactionValueError.mjs";
import { ErrorCategory as n } from "../types.mjs";
//#region libs/shared/common/src/error-handling/customErrors/customErrors.helpers.ts
var r = (r, i) => {
	let { totalFeeWEI: a, feeUnit: o } = r.data;
	if (!o) return r.message;
	let s = t(o, a), c = "transact", l = "an equivalent of ";
	return i === n.WITHDRAW && (c = "withdraw", l = ""), `Fees are over transaction value. Please ${c} at least ${l} ${e(Number(s))} of ${o?.symbol} (subject to real-time price)`;
};
//#endregion
export { r as getGenericFeeOverTransactionValueErrorMessage };
