"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./context-rs-ygOK2.js"),n=require("./errors-CBapWvRs.js"),i=require("./events-context-Di6--rDg.js"),o=require("./internal-context-CdsQ3LEl.js"),l=require("./modal-context-BgeioxwT.js"),c=require("./ConnectWalletView-DM2o0nGM.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("@heroicons/react/24/outline"),require("@tanstack/react-virtual"),require("react-device-detect"),require("styled-components"),require("./ModalHeader-Cpls13mi.js"),require("./useActiveWallet-dTc6deka.js"),require("viem/utils"),require("./wallet-connect-BuohfvHK.js"),require("./getPublicClient-CFd_sHBk.js"),require("viem"),require("viem/chains"),require("eventemitter3"),require("./privy-context-UTJouJ1x.js"),require("@privy-io/are-addresses-equal"),require("./index-Ub4KpwSY.js"),require("zustand"),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("./CopyableText-SJxK10XO.js"),require("lucide-react"),require("./Link-BdtTp2J4.js"),require("./QrCode-ErbyIBDF.js"),require("qrcode"),require("./EmailInputForm-Y-nHsEtF.js"),require("./ErrorMessage-BfTVyue9.js"),require("./useI18n-DMbkgRzj.js"),require("./WalletCards-BfpeHH5n.js"),require("./styles-COEGLFkM.js"),require("./Screen-8NusMFtu.js"),require("./index-ByFhjjzH.js");const a={component:()=>{let{setWalletConnectionStatus:a,closePrivyModal:s,inProgressAuthFlowRef:u}=o.usePrivyInternal(),{data:q,navigate:d}=l.usePrivyModal(),C=t.useAppConfig(),p=i.useEmitPrivyEvent(),j=q?.externalConnectWallet?.description,v=r.useRef(q?.externalConnectWallet?.walletList??C.appearance.walletList),W=r.useRef(q?.externalConnectWallet?.walletChainType??C.appearance.walletChainType),y=v.current,E=W.current,x="link"===u.current?void 0:()=>d("LandingScreen");/*#__PURE__*/return e.jsx(c.i,{walletList:y,walletChainType:E,onClose:s,onConnect:r.useCallback((({connector:e,wallet:r})=>{p("connectWallet","onSuccess",{wallet:r}),a({status:"connected",connectedWallet:r,connector:e,connectError:null,connectRetry:()=>null}),d("ConnectionStatusScreen",!q?.externalConnectWallet?.preSelectedWalletId)}),[a,d,q?.login?.disableSignup,q?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof n.PrivyError?(console.warn(e.cause?e.cause:e.message),p("connectWallet","onError",e.privyErrorCode||n.PrivyErrorCode.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),p("connectWallet","onError",n.PrivyErrorCode.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:x,customDescription:j||"",preSelectedWalletId:q?.externalConnectWallet?.preSelectedWalletId,app:C})},isUnauthenticatedScreem:!0};exports.AuthenticateWithWalletScreen=a,exports.default=a;
//# sourceMappingURL=AuthenticateWithWalletScreen-DGj0V2kb.js.map
