1import{r as h,j as r}from"./index-7WnyX64m.js";import{u as j,h as g}from"./ModalFooter-Dgk75taJ-yQvQw617.js";import{a as C}from"./Layouts-BMRfo5hw-CbD-JBl6.js";import{t as D}from"./FundWalletMethodHeader-Cvy_dGCT-BowellGh.js";import{n as F}from"./index-CWARkn2w-DIPPjhLs.js";import{e as v}from"./Title-BnzYV3Is-rP3Nh1e4.js";import{d8 as $}from"./PrivyWallet-B57uYG1D.js";import{c as E}from"./useGetTokenPrice-DRP-TqN8-CvPrHnrT.js";import{n as T}from"./ethers-DNxEwCFm-Ces6-0U3.js";import{a as b,p as k,d as y,c as A,l as U}from"./styles-SApnC3Gb-B80VRzvf.js";import"./useGetSolPrice-x7gfUIHJ-CtUgIpnP.js";import"./LinkPasskeyScreen-BDbH74WG-BOnBNLrw.js";import"./TodoList-DnyULl18-Bc4bYicI.js";import"./x-CNvhCcV1.js";import"./createLucideIcon-C1NbRZnd.js";import"./check-DRaXnKYU.js";import"./ScreenLayout-BAaQVxl--VJCgyXQE.js";import"./Screen-u_C2Hkch-DpZqSY30.js";import"./circle-check-big-DfcHLx8a.js";import"./fingerprint-pattern-B1fdrD6b.js";const Y={component:()=>{var p;let{data:t,setModalData:u}=$(),o=t==null?void 0:t.funding,a=o.chainType==="solana",s=h.useRef(null),{tokenPrice:m}=E(a?"solana":o.chain.id),n=a?void 0:o,x=!(!(n!=null&&n.erc20Address)||n!=null&&n.erc20ContractInfo),f=a?o.isUSDC?"USDC":"SOL":o.erc20Address?(p=o.erc20ContractInfo)==null?void 0:p.symbol:o.chain.nativeCurrency.symbol||"ETH",l=parseFloat(o.amount),d=!isNaN(l)&&l>0,c=m?T(o.amount,m):void 0;return r.jsxs(r.Fragment,{children:[r.jsx(D,{}),r.jsx(v,{children:"Confirm or edit amount"}),r.jsxs(C,{style:{marginTop:"32px"},children:[r.jsx(b,{children:x?r.jsx(F,{size:"50px"}):r.jsxs(r.Fragment,{children:[r.jsxs(k,{onClick:()=>{var i;return(i=s.current)==null?void 0:i.focus()},children:[r.jsx(y,{ref:s,value:o.amount,onChange:i=>{let e=i.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&u({...t,funding:{...o,amount:e},solanaFundingData:t!=null&&t.solanaFundingData?{...t.solanaFundingData,amount:e}:void 0})}}),r.jsx(A,{children:f})]}),!(n!=null&&n.erc20Address)&&!(a&&o.isUSDC)&&r.jsx(U,{children:c&&d?`${c} USD`:""})]})}),r.jsx(j,{style:{marginTop:"1rem"},disabled:!d,onClick:o.onContinueWithExternalWallet,children:"Continue"})]}),r.jsx(g,{})]})}};export{Y as FundingAmountEditScreen,Y as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.