import{t as e}from"./getFormattedUsdFromLamports-B6EqSEho.js";function t(e,t=6,n=!1,r=!1){let i=(parseFloat(e.toString())/1e9).toFixed(t).replace(/0+$/,``).replace(/\.$/,``),a=r?``:` SOL`;return n?`${i}${a}`:`${i===`0`?`<0.001`:i}${a}`}function n({amount:n,fee:r,tokenPrice:i,isUsdc:a}){let o=BigInt(Math.floor(parseFloat(n)*10**(a?6:9))),s=a?o:o+r;return{fundingAmountInBaseUnit:o,fundingAmountInUsd:i?e(o,i):void 0,totalPriceInUsd:i?e(s,i):void 0,totalPriceInNativeCurrency:t(s),feePriceInNativeCurrency:t(r),feePriceInUsd:i?e(r,i):void 0}}export{t as n,n as t};