'use client'
'use strict';

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

var jsxRuntime = require('react/jsx-runtime');
var walletBook = require('@dynamic-labs/wallet-book');
require('@dynamic-labs/sdk-api-core');
require('../../../../utils/constants/values.cjs');
require('@dynamic-labs/utils');
require('../../../../../../_virtual/_tslib.cjs');
require('@dynamic-labs/multi-wallet');
require('../../../../shared/logger.cjs');
require('react-international-phone');
require('../../../../utils/constants/colors.cjs');
var getChainIcon = require('../../../../shared/utils/functions/chain/getChainIcon.cjs');
require('@dynamic-labs/wallet-connector-core');
require('react');
require('@dynamic-labs/iconic');
require('../../../../context/ViewContext/ViewContext.cjs');
require('../../../../shared/consts/index.cjs');
require('../../../../store/state/nonce/nonce.cjs');
var pixelToRem = require('../../../../utils/functions/pixelToRem/pixelToRem.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('../../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');

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

exports.WalletIconWithNetwork = WalletIconWithNetwork;
