"use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),s=require("react"),t=require("styled-components"),i=require("./ModalHeader-Cpls13mi.js"),o=require("./ErrorMessage-BfTVyue9.js"),d=require("./LabelXs-C8rLnCfU.js"),l=require("./Address-DW_NyDV7.js"),n=require("./shared-DBm7PUrg.js");let a=t.styled(n.Box)`
  && {
    padding: 0.75rem;
    height: 56px;
  }
`,c=t.styled.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
`,u=t.styled.div`
  display: flex;
  flex-direction: column;
  gap: 0;
`,x=t.styled.div`
  font-size: 12px;
  line-height: 1rem;
  color: var(--privy-color-foreground-3);
`,h=t.styled(d.LabelXs)`
  text-align: left;
  margin-bottom: 0.5rem;
`,p=t.styled(o.ErrorMessage)`
  margin-top: 0.25rem;
`,j=t.styled(i.SecondaryButton)`
  && {
    gap: 0.375rem;
    font-size: 14px;
  }
`;exports.WalletInfoCard=({errMsg:t,balance:i,address:o,className:d,title:n,showCopyButton:m=!1})=>{let[g,y]=s.useState(!1);return s.useEffect((()=>{if(g){let e=setTimeout((()=>y(!1)),3e3);return()=>clearTimeout(e)}}),[g]),/*#__PURE__*/e.jsxs("div",{children:[n&&/*#__PURE__*/e.jsx(h,{children:n}),/*#__PURE__*/e.jsx(a,{className:d,$state:t?"error":void 0,children:/*#__PURE__*/e.jsxs(c,{children:[/*#__PURE__*/e.jsxs(u,{children:[/*#__PURE__*/e.jsx(l.Address,{address:o,showCopyIcon:!1}),void 0!==i&&/*#__PURE__*/e.jsx(x,{children:i})]}),m&&/*#__PURE__*/e.jsx(j,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(o).then((()=>y(!0))).catch(console.error)},size:"sm",children:g?/*#__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})]})})]})}),t&&/*#__PURE__*/e.jsx(p,{children:t})]})};
//# sourceMappingURL=WalletInfoCard-CG-n_44w.js.map
