import { jsx as _jsx } from "react/jsx-runtime";
import { useEnsName } from "wagmi";
import { AccountPopoverUser } from "../account-popover/account-popover-user.js";
import { AccountPopover } from "../account-popover/account-popover.js";
import { ENSAvatar } from "../ens-avatar/ens-avatar.js";
export const SidebarUser = ({ address, etherscanUrl, onDisconnect, }) => {
    const { data } = useEnsName({ address });
    const ensName = data;
    const content = (_jsx(AccountPopoverUser, { address: address, username: ensName, onDisconnect: onDisconnect, etherscanUrl: etherscanUrl }));
    return (_jsx(AccountPopover, { content: content, children: _jsx("div", { className: "flex items-center justify-center rounded-sm", children: _jsx(ENSAvatar, { address: address, size: "40px" }) }) }));
};
//# sourceMappingURL=sidebar-user.js.map