import{jsx as e}from"react/jsx-runtime";import{useRef as t,useCallback as o}from"react";import{u as r}from"./context-BKnOUECq.mjs";import{b as n,a as i}from"./errors-Dd6zfYtp.mjs";import{a}from"./events-context-BJ75xIIf.mjs";import{u as l}from"./internal-context-dfitw7Ot.mjs";import{u as c}from"./modal-context-DBwfUxD-.mjs";import{i as m}from"./ConnectWalletView-Bbw4fdoE.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-DffkxvO4.mjs";import"./useActiveWallet-BEfvREjE.mjs";import"viem/utils";import"./wallet-connect-58EobR5U.mjs";import"./getPublicClient-D4yNgeGy.mjs";import"viem";import"viem/chains";import"eventemitter3";import"./privy-context-Bi6vqCPc.mjs";import"@privy-io/are-addresses-equal";import"./index-BtwxknTg.mjs";import"zustand";import"./get-entropy-details-for-user-BIWg0YxF.mjs";import"./user-D5cqJNp9.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./CopyableText-ChtfBWx4.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CvO4k-hN.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-nYc5Yqb0.mjs";import"./WalletCards-DH1rqayz.mjs";import"./styles-DVyDvTdj.mjs";import"./Screen-D8KNyGVj.mjs";import"./index-Dq_xe9dz.mjs";const s={component:()=>{let{setWalletConnectionStatus:s,closePrivyModal:p,inProgressAuthFlowRef:u}=l(),{data:d,navigate:j}=c(),C=r(),W=a(),x=d?.externalConnectWallet?.description,f=t(d?.externalConnectWallet?.walletList??C.appearance.walletList),v=t(d?.externalConnectWallet?.walletChainType??C.appearance.walletChainType),w=f.current,E=v.current,h="link"===u.current?void 0:()=>j("LandingScreen");/*#__PURE__*/return e(m,{walletList:w,walletChainType:E,onClose:p,onConnect:o((({connector:e,wallet:t})=>{W("connectWallet","onSuccess",{wallet:t}),s({status:"connected",connectedWallet:t,connector:e,connectError:null,connectRetry:()=>null}),j("ConnectionStatusScreen",!d?.externalConnectWallet?.preSelectedWalletId)}),[s,j,d?.login?.disableSignup,d?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),W("connectWallet","onError",e.privyErrorCode||i.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),W("connectWallet","onError",i.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:h,customDescription:x||"",preSelectedWalletId:d?.externalConnectWallet?.preSelectedWalletId,app:C})},isUnauthenticatedScreem:!0};export{s as AuthenticateWithWalletScreen,s as default};
//# sourceMappingURL=AuthenticateWithWalletScreen-BCEtwZd8.mjs.map
