import{o as e}from"./rolldown-runtime.js";import{n as t,t as n}from"./jsx-runtime.js";import{A as r,St as i,Vt as a,_t as o,j as s}from"./useActiveWallet-CEs8euQ3.js";import{k as c}from"./context-Cdw68BC2.js";import{t as l}from"./modal-context-DHfp-mFQ.js";import{n as u}from"./ConnectWalletView-INqAsNoN.js";import{n as d}from"./QrCode-BVnyWVuE.js";var f=n(),p=e(t(),1);s(),d();var m={component:()=>{let{closePrivyModal:e}=a(),{data:t,navigate:n}=l(),s=c(),d=r(),m=t?.externalConnectWallet?.description,h=(0,p.useRef)(t?.externalConnectWallet?.walletList??s.appearance.walletList),g=(0,p.useRef)(t?.externalConnectWallet?.walletChainType??s.appearance.walletChainType);return(0,f.jsx)(u,{walletList:h.current,walletChainType:g.current,preSelectedWalletId:t?.externalConnectWallet?.preSelectedWalletId,hideHeader:t?.externalConnectWallet?.hideHeader,onBack:t?.funding?()=>n(`FundingMethodSelectionScreen`):void 0,onClose:()=>{d(`connectWallet`,`onError`,o.GENERIC_CONNECT_WALLET_ERROR),e()},onConnect:({connector:r,wallet:i})=>{d(`connectWallet`,`onSuccess`,{wallet:i});let a=t?.externalConnectWallet?.onCompleteNavigateTo;a?n(a({address:i.address,walletClientType:r?.walletClientType,walletChainType:r?.chainType})):e()},onConnectError:e=>{e instanceof i?(console.warn(e.cause?e.cause:e.message),d(`connectWallet`,`onError`,e.privyErrorCode||o.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),d(`connectWallet`,`onError`,o.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:m,app:s,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};