'use client'
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var walletBook = require('@dynamic-labs/wallet-book');
var ErrorContext = require('../ErrorContext/ErrorContext.cjs');
var index = require('../FooterAnimationContext/index.cjs');
var ThemeContext = require('../ThemeContext/ThemeContext.cjs');
var ViewContext = require('../ViewContext/ViewContext.cjs');
require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
require('react-i18next');
require('@dynamic-labs/iconic');
require('../../../../_virtual/_tslib.cjs');
require('@dynamic-labs/utils');
require('@dynamic-labs/wallet-connector-core');
require('../../shared/logger.cjs');
require('../../utils/constants/colors.cjs');
require('../../utils/constants/values.cjs');
require('@dynamic-labs/sdk-api-core');
require('../../shared/consts/index.cjs');
require('../../components/Alert/Alert.cjs');
require('../../events/dynamicEvents.cjs');
require('../DynamicContext/useDynamicContext/useDynamicContext.cjs');
require('../DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
require('../CaptchaContext/CaptchaContext.cjs');
require('@dynamic-labs/multi-wallet');
require('react-international-phone');
require('../../store/state/nonce/nonce.cjs');
require('@dynamic-labs-wallet/browser-wallet-client');
require('@dynamic-labs-sdk/client/core');
require('eventemitter3');
require('@dynamic-labs-sdk/client');
require('../../config/ApiEndpoint.cjs');
require('@dynamic-labs/locale');
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
require('../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
require('../AccessDeniedContext/AccessDeniedContext.cjs');
require('../AccountExistsContext/AccountExistsContext.cjs');
require('../UserWalletsContext/UserWalletsContext.cjs');
require('../../store/state/authMode/authMode.cjs');
require('../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
require('../VerificationContext/VerificationContext.cjs');
require('react-dom');
require('../../utils/functions/compareChains/compareChains.cjs');
require('../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
require('bs58');
require('@dynamic-labs/types');
require('../SocialRedirectContext/SocialRedirectContext.cjs');
require('../LoadingContext/LoadingContext.cjs');
require('../WalletContext/WalletContext.cjs');
require('../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
require('yup');
require('../../views/CollectUserDataView/useFields.cjs');
require('../FieldsStateContext/FieldsStateContext.cjs');
require('../UserFieldEditorContext/UserFieldEditorContext.cjs');
require('@dynamic-labs/rpc-providers');
require('../../store/state/walletOptions/walletOptions.cjs');
var DynamicAuthModal = require('../../modals/DynamicAuthModal/DynamicAuthModal.cjs');
require('../../components/IconButton/IconButton.cjs');
require('formik');
require('../../store/state/sendBalances.cjs');
require('../../components/Input/Input.cjs');
require('../../components/OverlayCard/OverlayCard.cjs');
require('../../components/MenuList/Dropdown/Dropdown.cjs');
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
require('../PasskeyContext/PasskeyContext.cjs');
require('../../../index.cjs');
require('../../components/ShadowDOM/ShadowDOM.cjs');
require('../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
require('../WalletGroupContext/WalletGroupContext.cjs');
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
require('../../utils/hooks/useGetMfaToken/useGetMfaToken.cjs');
require('../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
require('../../utils/hooks/useWalletBackup/BackupError.cjs');
require('../../utils/hooks/useWalletBackup/types.cjs');
require('../../utils/hooks/useWalletBackup/cloudProviders.cjs');
require('@hcaptcha/react-hcaptcha');
require('@marsidev/react-turnstile');
require('../IpConfigurationContext/IpConfigurationContext.cjs');
require('../ConnectWithOtpContext/ConnectWithOtpContext.cjs');
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
require('../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
require('../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
require('../ErrorContext/hooks/useErrorText/useErrorText.cjs');
require('../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
require('../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
require('../OnrampContext/OnrampContext.cjs');
require('../../utils/hooks/useWalletDelegation/DelegationError.cjs');
require('../../store/state/connectorsInitializing/connectorsInitializing.cjs');
require('../../store/state/tokenBalances.cjs');
require('../../store/state/multichainBalances.cjs');
require('@dynamic-labs/store');
require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
require('../../components/InlineWidget/InlineWidget.cjs');
require('../../components/IsBrowser/IsBrowser.cjs');
require('../../components/Popper/Popper/Popper.cjs');
var PopperContext = require('../../components/Popper/PopperContext/PopperContext.cjs');
require('react-focus-lock');
require('qrcode');
var index$1 = require('./constants/index.cjs');

const MockContext = React.createContext(undefined);
const MockContextProvider = ({ children, view, customerTheme, dynamicLayoutClassName, }) => {
    const viewContextValue = {
        canGoBack: false,
        clearStackAndPush: () => { },
        clearStackAndPushInitialView: () => { },
        goBack: () => { },
        pushView: () => { },
        replaceView: () => { },
        stack: [],
        view,
    };
    return (jsxRuntime.jsx(MockContext.Provider, { value: { mockedSDK: true }, children: jsxRuntime.jsx(PopperContext.PopperProvider, { children: jsxRuntime.jsx(ViewContext.ViewContext.Provider, { value: viewContextValue, children: jsxRuntime.jsx(ErrorContext.ErrorContextProvider, { children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: customerTheme, children: jsxRuntime.jsx(index.FooterAnimationContextProvider, { children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: index$1.walletBookMock, children: jsxRuntime.jsx(MockContextWrapper, { dynamicLayoutClassName: dynamicLayoutClassName, children: children }) }) }) }) }) }) }) }));
};
const MockContextWrapper = ({ dynamicLayoutClassName, children, }) => {
    /* istanbul ignore next */
    const onClose = () => new Promise(() => { });
    const mockProjectSettings = {
        chains: [],
        design: {},
        general: {},
        kyc: [],
        privacy: {},
        sdk: { walletConnect: { projectId: '', v2Enabled: false } },
        security: {},
    };
    return (jsxRuntime.jsx("div", { className: 'mock-ctx__container', style: { position: 'relative' }, children: jsxRuntime.jsx(DynamicAuthModal.DynamicAuthModal, { className: dynamicLayoutClassName, onClose: onClose, projectSettings: mockProjectSettings, transitionProps: {
                isShown: true,
            }, children: children }) }));
};
const useMockContext = () => {
    const context = React.useContext(MockContext);
    if (context === undefined) {
        return { mockedSDK: false };
    }
    return context;
};

exports.MockContext = MockContext;
exports.MockContextProvider = MockContextProvider;
exports.MockContextWrapper = MockContextWrapper;
exports.useMockContext = useMockContext;
