'use client'
'use strict';

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

var sdkApiCore = require('@dynamic-labs/sdk-api-core');
require('../../../../constants/values.cjs');
require('@dynamic-labs/utils');
require('../../../../../../../_virtual/_tslib.cjs');
require('@dynamic-labs/multi-wallet');
var logger = require('../../../../../shared/logger.cjs');
require('react-international-phone');
require('../../../../constants/colors.cjs');
require('@dynamic-labs/iconic');
require('@dynamic-labs/wallet-connector-core');
require('react');
require('react/jsx-runtime');
require('../../../../../context/ViewContext/ViewContext.cjs');
require('@dynamic-labs/wallet-book');
require('../../../../../shared/consts/index.cjs');
require('../../../../../store/state/nonce/nonce.cjs');
var isProviderEnabled = require('../../../../functions/isProviderEnabled/isProviderEnabled.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('../../../../../events/dynamicEvents.cjs');
require('@dynamic-labs/locale');
require('../../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
require('../../../../../store/state/primaryWalletId/primaryWalletId.cjs');
require('../../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
require('../../../../functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');

const zeroDevWalletConnectorKey = 'zerodev';
const verifyZeroDevIsSetup = (projectSettings, walletConnectors) => {
    var _a;
    const isZeroDevEnabled = isProviderEnabled.isProviderEnabled((_a = projectSettings.providers) !== null && _a !== void 0 ? _a : [], sdkApiCore.ProviderEnum.Zerodev);
    const isZeroDevWalletConnectorPresent = walletConnectors.some(({ key }) => key === zeroDevWalletConnectorKey);
    if (isZeroDevEnabled && !isZeroDevWalletConnectorPresent) {
        // A ZeroDev connector that's enabled in project settings but absent from
        // `walletConnectors` is an explicit decision to migrate off ZeroDev —
        // whether to native EVM gas sponsorship or to plain EOAs with no
        // sponsorship at all. Warn and continue (wallets fall back to the embedded
        // EOA) instead of hard-throwing and white-screening the app.
        logger.logger.warn('ZeroDev is enabled in project settings but ZeroDevSmartWalletConnectors is not in walletConnectors. Continuing without ZeroDev — wallets will fall back to the embedded EOA (gas is sponsored only if native EVM gas sponsorship is enabled).');
    }
};

exports.verifyZeroDevIsSetup = verifyZeroDevIsSetup;
