"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("@argent/x-shared"),m=require("../../../providers/CurrencyProvider.cjs"),x=require("../../../providers/TokenProvider.cjs"),t=require("@chakra-ui/react"),T=({tokenAddress:l,amount:u,fiatAmount:e,networkId:y})=>{const n=x.useToken({address:l,networkId:y}),s=m.useCurrency(),i=(s==null?void 0:s.symbol)||r.getCurrencySymbol((e==null?void 0:e.currency)??"USD"),c=r.prettifyCurrencyValue(e==null?void 0:e.currencyAmount,i);if(!n)return o.jsx(t.Text,{ml:"auto",textAlign:"right",children:c});const d=r.prettifyTokenAmount({amount:u,decimals:r.ensureDecimals(n.decimals),symbol:n.symbol});return o.jsxs(t.Text,{ml:"auto",textAlign:"right",children:[d," (",c,")"]})};exports.TokenAndAmountValue=T;
