"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./modal-context-BgeioxwT.js"),i=require("./privy-context-UTJouJ1x.js"),o=require("./ScreenLayout-DaFW0I3a.js");require("./context-rs-ygOK2.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-CdsQ3LEl.js"),require("@privy-io/are-addresses-equal"),require("./ModalHeader-Cpls13mi.js"),require("styled-components"),require("./useActiveWallet-dTc6deka.js"),require("viem/utils"),require("./wallet-connect-BuohfvHK.js"),require("./errors-CBapWvRs.js"),require("ofetch"),require("./getPublicClient-CFd_sHBk.js"),require("viem"),require("viem/chains"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("./index-Ub4KpwSY.js"),require("zustand"),require("react-device-detect"),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("./Screen-8NusMFtu.js"),require("./index-ByFhjjzH.js");const n=({title:t,subtitle:r,buttonText:i,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:s})=>/*#__PURE__*/e.jsx(o.ScreenLayout,{title:t,subtitle:r,primaryCta:{label:i,onClick:()=>{n&&window.open(n,"_self"),s?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:o}=i.usePrivyContext(),{data:l}=r.usePrivyModal(),[a,s]=t.useState(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:u,connectOnly:c,chainType:d}=l.installWalletModalData,q=u.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===d,connectOnly:c}),p=u.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${p} Mobile Wallet`,description:`We'll take you to the ${p} Mobile Wallet app to continue your login experience.`,footnote:""};return o&&(h.description=`For the best experience, we'll automatically log you into the ${p} 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 ${u.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${u.name} wallet to complete the login.`),/*#__PURE__*/e.jsx(n,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:q,isLoading:o&&!q,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>s(!0)),1e3)}})}};exports.WalletInterstitialScreen=l,exports.WalletInterstitialScreenView=n,exports.default=l;
//# sourceMappingURL=WalletInterstitialScreen-CXaXHGcV.js.map
