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