import{jsx as t,jsxs as C,Fragment as b}from"react/jsx-runtime";import{ButtonContainer as y}from"../containers/button.js";import"../containers/card.js";import{css as l}from"@styled/css";import{HStack as S}from"@styled/jsx";import{token as f}from"@styled/tokens";import W from"../icons/ico-checkmark.js";import $ from"../icons/ico-copy.js";import"../primitives/button.js";import"../primitives/checkbox.js";import"../primitives/dropdown-selector.js";import"../primitives/popover.js";import"../primitives/radio.js";import"../primitives/segmented-control.js";import"../primitives/switch.js";import"../primitives/text.js";import{forwardRef as k,useState as w,useCallback as z,useEffect as N}from"react";import"../utils/client-asset-logo.js";import"react-qrcode-logo";import"../utils/secured-by-magic.js";import"../containers/header.js";import"../containers/menu.js";import"../containers/modal.js";import"../containers/overlay.js";const d=k((u,h)=>{const{address:r,onCopy:e,size:m="md",icon:n,fontColor:s="text.tertiary",fontWeight:p="normal"}=u,[o,a]=w(!1),c=`${r.slice(0,6)}...${r?.slice(-4)}`,i=m==="sm"?16:20,x=z(()=>{e&&e(r),a(!0)},[r]);return N(()=>{if(o){const g=setTimeout(()=>{a(!1)},1500);return()=>clearTimeout(g)}},[o]),e?t(y,{className:l({fontSize:m,color:o?"positive.base":s,fontWeight:o?"medium":p,rounded:"button",fontVariant:"no-contextual",transition:"none"}),onPress:x,ref:h,children:C(S,{gap:2,children:[o?n?"Copied":"Copied!":c,n&&t(b,{children:o?t(W,{width:i,height:i,color:f("colors.positive.base")}):t($,{width:i,height:i,color:f("colors.text.tertiary")})})]})}):t("span",{className:l({fontSize:m,color:s,fontWeight:p,fontVariant:"no-contextual"}),children:c})});d.displayName="WalletAddress";export{d as default};
//# sourceMappingURL=wallet-address.js.map
