import{Flex as u,Text as L}from"@chakra-ui/react";import y from"@emotion/styled";import{useEffect as T,useState as m}from"react";var s=(e,t)=>e?e.length>t?e.substr(0,t-1)+"..."+e.substr(e.length-(t-1),e.length-1):e:"";var c=(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?.()}};import a,{jsNumberForAddress as C}from"react-jazzicon";import{default as v}from"react-shadow/emotion";import{jsx as b}from"react/jsx-runtime";var k=({address:e})=>{let t=Object.keys(v).length?a.default:a;return b(t,{diameter:"24",seed:C(e),svgStyles:{display:"block",verticalAlign:"middle"},paperStyles:{border:"1px solid #ffffff"}})},l=k;import"react";import{jsx as f,jsxs as A}from"react/jsx-runtime";var z=e=>A("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[f("path",{d:"M21.5 13L14.1625 20L10.5 16.5",stroke:e.iconcolor??"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),f("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:e.iconcolor??"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),p=z;import"react";import{jsx as d,jsxs as S}from"react/jsx-runtime";var I=e=>S("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[d("path",{d:"M27 23V5H9",stroke:e.iconcolor??"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M23 9H5V27H23V9Z",stroke:e.iconcolor??"#49536E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),h=I;import{jsx as r,jsxs as g}from"react/jsx-runtime";var E=y(h)`
  cursor: pointer;
`,M=y(p)`
  cursor: pointer;
`,$=({address:e,domain:t})=>{let[o,n]=m(!1),[w,i]=m(e),x=()=>{n(!0),c(e),setTimeout(()=>{n(!1)},1e3)};return T(()=>{i(t||s(e,6))},[t,e]),g(u,{alignItems:"center",children:[r(l,{address:e}),g(u,{alignItems:"center",children:[r(L,{mx:"1",children:w}),o?r(M,{width:24,height:24,iconcolor:o&&"green"}):r(E,{width:24,height:24,onClick:x})]})]})},ee=$;export{ee as default};
