import { getAmountInToken as e, getAmountInWei as t } from "../web3/etherFunctions.mjs";
//#region libs/shared/common/src/functions/utils/solanaSendPreflight.utils.ts
var n = (e, n, r) => {
	try {
		return e && e[n] && r ? t(r, e[n]) : 0n;
	} catch {
		return 0n;
	}
}, r = (t, r, i, a, o, s) => t.map((t, c) => {
	let l = n(r, c, i);
	if (!(l > 0n && t.recipientSolBalanceLamports + l < t.systemRentExemptLamports)) return "";
	let u = t.systemRentExemptLamports - t.recipientSolBalanceLamports, d = "0";
	try {
		o && u > 0n && (d = Number(e(o, u)).toFixed(6).replace(/\.?0+$/, ""));
	} catch {
		d = "0";
	}
	return a.length === 1 ? `Minimum amount to send is ${d} SOL` : `Minimum amount to send to recipient ${s?.[c] ? s[c] - 1 : c + 1} is ${d} SOL`;
});
//#endregion
export { r as buildSolanaRecipientRentErrorMessages };
