"use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),s=require("react"),t=require("styled-components"),o=require("./wallet-connect-BuohfvHK.js"),i=require("./ModalHeader-Cpls13mi.js");let n=t.styled.span`
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
`,l=t.styled.span`
  font-size: 14px;
  font-weight: 500;
  color: var(--privy-color-foreground);
`,a=t.styled.a`
  font-size: 14px;
  color: var(--privy-color-foreground);
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
`;exports.Address=({address:t,showCopyIcon:c,url:d,className:p})=>{let[u,x]=s.useState(!1);function m(e){e.stopPropagation(),navigator.clipboard.writeText(t).then((()=>x(!0))).catch(console.error)}return s.useEffect((()=>{if(u){let e=setTimeout((()=>x(!1)),3e3);return()=>clearTimeout(e)}}),[u]),d?/*#__PURE__*/e.jsxs(n,{children:[/*#__PURE__*/e.jsx(a,{title:t,className:p,href:`${d}/address/${t}`,target:"_blank",children:o.formatWalletAddress(t)}),c&&/*#__PURE__*/e.jsx(i.SecondaryButton,{onClick:m,size:"sm",style:{gap:"0.375rem"},children:u?/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copied",/*#__PURE__*/e.jsx(r.Check,{size:16})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copy",/*#__PURE__*/e.jsx(r.Copy,{size:16})]})})]}):/*#__PURE__*/e.jsxs(n,{children:[/*#__PURE__*/e.jsx(l,{title:t,className:p,children:o.formatWalletAddress(t)}),c&&/*#__PURE__*/e.jsx(i.SecondaryButton,{onClick:m,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:u?/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copied",/*#__PURE__*/e.jsx(r.Check,{size:14})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copy",/*#__PURE__*/e.jsx(r.Copy,{size:14})]})})]})};
//# sourceMappingURL=Address-DW_NyDV7.js.map
