'use client'
import { jsxs, jsx } from 'react/jsx-runtime';
import { WalletIcon } from '@dynamic-labs/wallet-book';
import '@dynamic-labs/sdk-api-core';
import '../../../../utils/constants/values.js';
import '@dynamic-labs/utils';
import '../../../../../../_virtual/_tslib.js';
import '@dynamic-labs/multi-wallet';
import '../../../../shared/logger.js';
import 'react-international-phone';
import '../../../../utils/constants/colors.js';
import { getChainIcon } from '../../../../shared/utils/functions/chain/getChainIcon.js';
import '@dynamic-labs/wallet-connector-core';
import 'react';
import '@dynamic-labs/iconic';
import '../../../../context/ViewContext/ViewContext.js';
import '../../../../shared/consts/index.js';
import '../../../../store/state/nonce/nonce.js';
import { pixelToRem } from '../../../../utils/functions/pixelToRem/pixelToRem.js';
import '@dynamic-labs-wallet/browser-wallet-client';
import '@dynamic-labs-sdk/client/core';
import 'eventemitter3';
import '@dynamic-labs-sdk/client';
import '../../../../config/ApiEndpoint.js';
import '../../../../events/dynamicEvents.js';
import '@dynamic-labs/locale';
import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
import '../../../../store/state/primaryWalletId/primaryWalletId.js';
import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
import '../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
import { classNames } from '../../../../utils/functions/classNames/classNames.js';

const WalletIconWithNetwork = ({ iconSize = 24, chainName, Icon, showNetwork = true, walletKey, iconUrl, }) => {
    const ChainIcon = chainName ? getChainIcon(chainName) : undefined;
    return (jsxs("div", { className: 'wallet-icon-with-network__container', children: [Icon ? (jsx(Icon, { style: {
                    height: pixelToRem(iconSize),
                    width: pixelToRem(iconSize),
                } })) : (jsx(WalletIcon, { icon: iconUrl, walletKey: walletKey, style: {
                    height: pixelToRem(iconSize),
                    width: pixelToRem(iconSize),
                } })), ChainIcon && showNetwork && (jsx("div", { "data-testid": 'network-container', className: classNames('wallet-icon-with-network__network-container'), children: jsx(ChainIcon, {}) }))] }));
};

export { WalletIconWithNetwork };
