import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-VpbQV-TA.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as d}from"./transaction-CnfuREWo.mjs";import{d as m}from"./wallet-connect-58EobR5U.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),d=i?s(c,i):void 0,m=a(c,l);/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(x,{children:"USD"}),"<$0.01"===d?
/*#__PURE__*/r(k,{children:[/*#__PURE__*/e(g,{children:"<"}),"$0.01"]}):d]}):m})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),m=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?d(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/e(t,{children:"<$0.01"===m?
/*#__PURE__*/r(k,{children:[/*#__PURE__*/e(g,{children:"<"}),"$0.01"]}):m}):p})};let u=n.span`
  font-size: 14px;
  line-height: 140%;
  display: flex;
  gap: 4px;
  align-items: center;
`,x=n.span`
  font-size: 12px;
  line-height: 12px;
  color: var(--privy-color-foreground-3);
`,g=n.span`
  font-size: 10px;
`,k=n.span`
  display: flex;
  align-items: center;
`;function y(e,t){return`https://explorer.solana.com/account/${e}?chain=${t}`}const S=t=>/*#__PURE__*/e($,{href:"ethereum"===t.chainType?l(t.chainId,t.walletAddress):y(t.walletAddress,t.chainId),target:"_blank",children:m(t.walletAddress)});let $=n.a`
  &:hover {
    text-decoration: underline;
  }
`;export{p as H,h as P,f as S,S as W};
//# sourceMappingURL=WalletLink-B5NUjxf-.mjs.map
