import { isSolanaLike as e, isTempo as t } from "../../constants/chains.constants.mjs";
import { zeroAddress as n } from "../../constants/protocol.constants.mjs";
import { caseInsensitiveEqual as r } from "./caseInsensitive.utils.mjs";
import { chainNativeTokenSymbol as i } from "../../constants/tokens.constants.mjs";
import { findTokenBySymbolFromTokenList as a } from "./erc20tokenFunctions.mjs";
import { TEMPO_INBOUND_BRIDGE_DEST_SYMBOLS as o, TEMPO_OUTBOUND_BRIDGE_DEST_SYMBOLS as s } from "../../constants/bridging.constants.mjs";
import { LIFISCAN_URL as c } from "../../constants/lifi.constants.mjs";
//#region libs/shared/common/src/functions/utils/lifi.utils.ts
var l = (e) => `${c}/tx/${e}`, u = (e, n, r) => {
	if (t(e.chainId)) {
		let t = s[e.erc20TokenAddress.toLowerCase()];
		if (t) return a(r, t);
	}
	if (t(n)) {
		let t = o[e.symbol];
		if (t) return a(r, t);
	}
}, d = (t, a, o) => {
	let s = i[t], c = i[a];
	if (s) {
		if (s === c) return o.find((e) => e.erc20TokenAddress === n || e.erc20TokenAddress === "11111111111111111111111111111111");
		if (s === "ETH") {
			let t = e(a) ? "ETH" : "WETH";
			return o.find((e) => r(e.symbol, t) && e.erc20TokenAddress !== n && e.erc20TokenAddress !== "11111111111111111111111111111111");
		}
		return o.find((e) => r(e.symbol, s) && e.erc20TokenAddress !== n && e.erc20TokenAddress !== "11111111111111111111111111111111");
	}
};
//#endregion
export { u as getEquivalentBridgedTokenForTempo, d as getEquivalentNativeToken, l as getLifiScanURL };
