"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),b=require("../containers/button.js");require("../containers/card.js");var s=require("../../lib/cn.js"),g=require("../icons/ico-checkmark.js"),w=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 a=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 f={sm:"text-sm",md:"text-base"},q={"text.primary":"text-text-primary","text.secondary":"text-text-secondary","text.tertiary":"text-text-tertiary"},y={normal:"font-normal",medium:"font-medium"},v=a.forwardRef((h,p)=>{const{address:t,onCopy:o,size:n="md",icon:u,fontColor:l="text.tertiary",fontWeight:c="normal",fontFamily:d="inherit"}=h,[r,m]=a.useState(!1),x=`${t.slice(0,6)}...${t?.slice(-4)}`,i=n==="sm"?16:20,j=a.useCallback(()=>{o&&o(t),m(!0)},[t]);return a.useEffect(()=>{if(r){const C=setTimeout(()=>{m(!1)},1500);return()=>clearTimeout(C)}},[r]),o?e.jsx(b.ButtonContainer,{className:s.cn(f[n],r?"text-positive-base font-medium":s.cn(q[l],y[c]),"rounded-button [font-variant:no-contextual] transition-none"),style:{fontFamily:d},onPress:j,ref:p,children:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[r?u?"Copied":"Copied!":x,u&&e.jsx(e.Fragment,{children:r?e.jsx(g.default,{width:i,height:i,color:"var(--color-positive-base)"}):e.jsx(w.default,{width:i,height:i,color:"var(--color-text-tertiary)"})})]})}):e.jsx("span",{className:s.cn(f[n],q[l],y[c],"[font-variant:no-contextual]"),style:{fontFamily:d},children:x})});v.displayName="WalletAddress",exports.default=v;
//# sourceMappingURL=wallet-address.js.map
