var z=Object.defineProperty,A=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var a=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var l=(e,t,o)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))S.call(t,o)&&l(e,o,t[o]);if(a)for(var o of a(t))L.call(t,o)&&l(e,o,t[o]);return e},n=(e,t)=>A(e,I(t));import{Flex as w,Text as j}from"@chakra-ui/react";import v from"@emotion/styled";import{useEffect as N,useState as x}from"react";var f=(e,t)=>e?e.length>t?e.substr(0,t-1)+"..."+e.substr(e.length-(t-1),e.length-1):e:"";var p=(e,t)=>{if(navigator.clipboard&&navigator.permissions)navigator.clipboard.writeText(e).then(t);else if(document.queryCommandSupported("copy")){let o=document.createElement("textarea");o.value=e,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),t==null||t()}};import d,{jsNumberForAddress as T}from"react-jazzicon";import{default as E}from"react-shadow/emotion";import{jsx as $}from"react/jsx-runtime";var M=({address:e})=>{let t=Object.keys(E).length?d.default:d;return $(t,{diameter:"24",seed:T(e),svgStyles:{display:"block",verticalAlign:"middle"},paperStyles:{border:"1px solid #ffffff"}})},h=M;import"react";import{jsx as u,jsxs as R}from"react/jsx-runtime";var P=e=>{var t,o;return R("svg",n(r({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},e),{children:[u("path",{d:"M21.5 13L14.1625 20L10.5 16.5",stroke:(t=e.iconcolor)!=null?t:"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),u("path",{d:"M16 28C22.6274 28 28 22.6274 28 16C28 9.37258 22.6274 4 16 4C9.37258 4 4 9.37258 4 16C4 22.6274 9.37258 28 16 28Z",stroke:(o=e.iconcolor)!=null?o:"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},m=P;import"react";import{jsx as g,jsxs as J}from"react/jsx-runtime";var B=e=>{var t,o;return J("svg",n(r({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},e),{children:[g("path",{d:"M27 23V5H9",stroke:(t=e.iconcolor)!=null?t:"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g("path",{d:"M23 9H5V27H23V9Z",stroke:(o=e.iconcolor)!=null?o:"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},y=B;import{jsx as i,jsxs as C}from"react/jsx-runtime";var U=v(y)`
  cursor: pointer;
`,V=v(m)`
  cursor: pointer;
`,W=({address:e,domain:t})=>{let[o,s]=x(!1),[k,c]=x(e),b=()=>{s(!0),p(e),setTimeout(()=>{s(!1)},1e3)};return N(()=>{c(t||f(e,6))},[t,e]),C(w,{alignItems:"center",children:[i(h,{address:e}),C(w,{alignItems:"center",children:[i(j,{mx:"1",children:k}),o?i(V,{width:24,height:24,iconcolor:o&&"green"}):i(U,{width:24,height:24,onClick:b})]})]})},ue=W;export{ue as default};
