"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),t=require("viem"),i=require("./ethers-DEImj_8B.js"),s=require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),n=require("./transaction-DjF5X-by.js"),l=require("./wallet-connect-BuohfvHK.js");let o=r.styled.span`
  font-size: 14px;
  line-height: 140%;
  display: flex;
  gap: 4px;
  align-items: center;
`,a=r.styled.span`
  font-size: 12px;
  line-height: 12px;
  color: var(--privy-color-foreground-3);
`,d=r.styled.span`
  font-size: 10px;
`,c=r.styled.span`
  display: flex;
  align-items: center;
`;function m(e,r){return`https://explorer.solana.com/account/${e}?chain=${r}`}let u=r.styled.a`
  &:hover {
    text-decoration: underline;
  }
`;exports.HeaderPriceDisplay=({weiQuantities:r,tokenPrice:t,tokenSymbol:s})=>{let n=i.sumWeiQuantities(r),l=t?i.getDollarsFromWei(n,t):void 0,a=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(o,{children:l||a})},exports.PriceDisplay=({weiQuantities:r,tokenPrice:t,tokenSymbol:s})=>{let n=i.sumWeiQuantities(r),l=t?i.getDollarsFromWei(n,t):void 0,m=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(o,{children:l?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a,{children:"USD"}),"<$0.01"===l?
/*#__PURE__*/e.jsxs(c,{children:[/*#__PURE__*/e.jsx(d,{children:"<"}),"$0.01"]}):l]}):m})},exports.SolanaPriceDisplay=({quantities:r,tokenPrice:i,tokenSymbol:l="SOL",tokenDecimals:a=9})=>{let m=r.reduce(((e,r)=>e+r),0n),u=i&&"SOL"===l&&9===a?s.getFormattedUsdFromLamports(m,i):void 0,p="SOL"===l&&9===a?n.getNativeCurrencyFromLamports(m):`${t.formatUnits(m,a)} ${l}`;/*#__PURE__*/return e.jsx(o,{children:u?/*#__PURE__*/e.jsx(e.Fragment,{children:"<$0.01"===u?
/*#__PURE__*/e.jsxs(c,{children:[/*#__PURE__*/e.jsx(d,{children:"<"}),"$0.01"]}):u}):p})},exports.WalletLink=r=>/*#__PURE__*/e.jsx(u,{href:"ethereum"===r.chainType?i.getBlockExplorerUrlForAddress(r.chainId,r.walletAddress):m(r.walletAddress,r.chainId),target:"_blank",children:l.formatWalletAddress(r.walletAddress)});
//# sourceMappingURL=WalletLink-Dxq-sK27.js.map
