"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "WalletPicker", {
    enumerable: true,
    get: function() {
        return WalletPicker;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _input = require("../../../input");
const _react = require("react");
const _chainPicker = require("../chainPicker");
const WalletPicker = (props)=>{
    const { chain, chains } = props;
    const address = (0, _react.useMemo)(()=>{
        if (!props.address) return "--";
        return props.address.replace(/^(.{6})(.*)(.{4})$/, "$1......$3");
    }, [
        props.address
    ]);
    //
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
        className: "orderly-flex orderly-gap-2",
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_input.Input, {
                className: "orderly-wallet-picker orderly-text-4xs orderly-text-base-contrast-36 desktop:orderly-text-3xs",
                containerClassName: "orderly-bg-base-500 orderly-rounded-borderRadius",
                disabled: true,
                value: address,
                fullWidth: true
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_chainPicker.ChainSelect, {
                value: chain,
                onValueChange: props.onChainChange,
                onChainInited: props.onChainInited,
                settingChain: props.settingChain,
                chains: props.chains
            })
        ]
    });
};

//# sourceMappingURL=walletPicker.js.map