import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o}from"./modal-context-DBwfUxD-.mjs";import{u as i}from"./privy-context-Bi6vqCPc.mjs";import{S as r}from"./ScreenLayout-Caq5mGD8.mjs";import"./context-BKnOUECq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-dfitw7Ot.mjs";import"@privy-io/are-addresses-equal";import"./ModalHeader-DffkxvO4.mjs";import"styled-components";import"./useActiveWallet-BEfvREjE.mjs";import"viem/utils";import"./wallet-connect-58EobR5U.mjs";import"./errors-Dd6zfYtp.mjs";import"ofetch";import"./getPublicClient-D4yNgeGy.mjs";import"viem";import"viem/chains";import"eventemitter3";import"./events-context-BJ75xIIf.mjs";import"./index-BtwxknTg.mjs";import"zustand";import"react-device-detect";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"./Screen-D8KNyGVj.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:e,subtitle:o,buttonText:i,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(r,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{n&&window.open(n,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:r}=i(),{data:l}=o(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:p,chainType:c}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===c,connectOnly:p}),d=s.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return r&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(n,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:r&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,n as WalletInterstitialScreenView,l as default};
//# sourceMappingURL=WalletInterstitialScreen-Dj4cq9Ul.mjs.map
