'use client'
import '@dynamic-labs-sdk/client/core';
import '@dynamic-labs/sdk-api-core';
import '../../../client/client.js';
import 'react';
import '@dynamic-labs-sdk/client';
import '../../../config/ApiEndpoint.js';
import '@dynamic-labs/iconic';
import '@dynamic-labs/wallet-connector-core';
import 'react/jsx-runtime';
import '../../../context/ViewContext/ViewContext.js';
import '../../../shared/logger.js';
import '@dynamic-labs/wallet-book';
import '@dynamic-labs/utils';
import '../../../utils/constants/colors.js';
import '../../../utils/constants/values.js';
import '../../../shared/consts/index.js';
import '../../../../../_virtual/_tslib.js';
import '@dynamic-labs/multi-wallet';
import 'react-international-phone';
import '../nonce/nonce.js';
import '@dynamic-labs/locale';
import '../dynamicContextProps/dynamicContextProps.js';
import '../primaryWalletId/primaryWalletId.js';
import '../../../events/dynamicEvents.js';
import { setUnverifiedWalletAccounts } from '../../../client/extension/unverifiedWalletAccounts/setUnverifiedWalletAccounts/setUnverifiedWalletAccounts.js';
import { createStoreState } from '../../internalImplementation/utils/createStoreState/createStoreState.js';

const { getConnectedWalletsInfo, resetConnectedWalletsInfo: resetConnectedWalletsInfoStore, setConnectedWalletsInfo: setConnectedWalletsInfoStore, useConnectedWalletsInfo, } = createStoreState('connectedWalletsInfo');
// We need to sync the unverified wallet accounts with the connected wallets info
// for the JS SDK to know when there's an active "session" and not do things like refetch project settings, etc
const resetConnectedWalletsInfo = () => {
    setUnverifiedWalletAccounts([]);
    resetConnectedWalletsInfoStore();
};
const setConnectedWalletsInfo = (value) => {
    setUnverifiedWalletAccounts(value);
    setConnectedWalletsInfoStore(value);
};

export { getConnectedWalletsInfo, resetConnectedWalletsInfo, setConnectedWalletsInfo, useConnectedWalletsInfo };
