"use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./ModalHeader-Cpls13mi.js"),n=require("./Layouts-D3TOcPhm.js"),t=require("./FundWalletMethodHeader-DHJHs1si.js"),s=require("./index-ByFhjjzH.js"),u=require("./Title-ifTy35V5.js"),o=require("./modal-context-BgeioxwT.js"),a=require("./useGetTokenPrice-kLl5cylh.js"),l=require("./ethers-DEImj_8B.js"),c=require("./styles-DHDp429W.js");require("styled-components"),require("./context-rs-ygOK2.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-dTc6deka.js"),require("viem/utils"),require("./wallet-connect-BuohfvHK.js"),require("./errors-CBapWvRs.js"),require("ofetch"),require("./getPublicClient-CFd_sHBk.js"),require("viem"),require("viem/chains"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("./internal-context-CdsQ3LEl.js"),require("./privy-context-UTJouJ1x.js"),require("@privy-io/are-addresses-equal"),require("./index-Ub4KpwSY.js"),require("zustand"),require("react-device-detect"),require("./get-entropy-details-for-user-D63rM5_a.js"),require("./user-D2oPA-vS.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./useGetSolPrice-BOxa4idj.js"),require("./LinkPasskeyScreen-C2FrXW9H.js"),require("lucide-react"),require("./TodoList-Cii_KrAk.js"),require("./usePrivy-Dt4_yE6Q.js"),require("./use-unlink-wallet-DAxmY7kq.js"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./pkce-CmuJlEgn.js"),require("jose"),require("./ScreenLayout-DaFW0I3a.js"),require("./Screen-8NusMFtu.js");const d={component:()=>{let{data:d,setModalData:q}=o.usePrivyModal(),j=d?.funding,x="solana"===j.chainType,h=r.useRef(null),{tokenPrice:m}=a.useGetTokenPrice(x?"solana":j.chain.id),g=x?void 0:j,p=!(!g?.erc20Address||g?.erc20ContractInfo),y=x?j.isUSDC?"USDC":"SOL":j.erc20Address?j.erc20ContractInfo?.symbol:j.chain.nativeCurrency.symbol||"ETH",v=parseFloat(j.amount),C=!isNaN(v)&&v>0,F=m?l.getDollarsFromStringFloat(j.amount,m):void 0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.t,{}),/*#__PURE__*/e.jsx(u.Title,{children:"Confirm or edit amount"}),/*#__PURE__*/e.jsxs(n.FlexContainer,{style:{marginTop:"32px"},children:[/*#__PURE__*/e.jsx(c.FundingQuantityWrapper,{children:p?/*#__PURE__*/e.jsx(s.NeutralSpinner,{size:"50px"}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(c.FundingQuantity,{onClick:()=>h.current?.focus(),children:[/*#__PURE__*/e.jsx(c.FundingAmountInputLarge,{ref:h,value:j.amount,onChange:e=>{let r=e.target.value;/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1&&q({...d,funding:{...j,amount:r},solanaFundingData:d?.solanaFundingData?{...d.solanaFundingData,amount:r}:void 0})}}),/*#__PURE__*/e.jsx(c.FundingCurrency,{children:y})]}),!g?.erc20Address&&!(x&&j.isUSDC)&&/*#__PURE__*/e.jsx(c.FundingDollars,{children:F&&C?`${F} USD`:""})]})}),/*#__PURE__*/e.jsx(i.PrimaryButtonWithoutGray,{style:{marginTop:"1rem"},disabled:!C,onClick:j.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/e.jsx(i.BlobbyFooter,{})]})}};exports.FundingAmountEditScreen=d,exports.default=d;
//# sourceMappingURL=FundingEditAmountScreen-ee-pHa8g.js.map
