import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-DffkxvO4.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-BOC18tYY.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
  && {
    padding: 0.75rem;
    height: 56px;
  }
`,f=n.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
`,g=n.div`
  display: flex;
  flex-direction: column;
  gap: 0;
`,u=n.div`
  font-size: 12px;
  line-height: 1rem;
  color: var(--privy-color-foreground-3);
`,x=n(d)`
  text-align: left;
  margin-bottom: 0.5rem;
`,v=n(l)`
  margin-top: 0.25rem;
`,y=n(m)`
  && {
    gap: 0.375rem;
    font-size: 14px;
  }
`;const j=({errMsg:n,balance:m,address:l,className:d,title:p,showCopyButton:j=!1})=>{let[b,w]=s(!1);return a((()=>{if(b){let e=setTimeout((()=>w(!1)),3e3);return()=>clearTimeout(e)}}),[b]),/*#__PURE__*/e("div",{children:[p&&/*#__PURE__*/r(x,{children:p}),/*#__PURE__*/r(h,{className:d,$state:n?"error":void 0,children:/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(g,{children:[/*#__PURE__*/r(c,{address:l,showCopyIcon:!1}),void 0!==m&&/*#__PURE__*/r(u,{children:m})]}),j&&/*#__PURE__*/r(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(l).then((()=>w(!0))).catch(console.error)},size:"sm",children:/*#__PURE__*/e(o,b?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})}),n&&/*#__PURE__*/r(v,{children:n})]})};export{j as W};
//# sourceMappingURL=WalletInfoCard-BVXOg6V2.mjs.map
