"use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),i=require("styled-components");let o=i.styled.button`
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.5rem;

  && {
    color: var(--privy-color-foreground);
    font-weight: 500;
  }

  svg {
    width: 0.875rem;
    height: 0.875rem;
  }
`,n=i.styled.span`
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--privy-color-foreground-2);
`,c=i.styled(r.Check)`
  color: var(--privy-color-icon-success);
  flex-shrink: 0;
`,l=i.styled(r.Copy)`
  color: var(--privy-color-icon-muted);
  flex-shrink: 0;
`;exports.CopyButton=({value:r,includeChildren:i,children:s,...a})=>{let[d,u]=t.useState(!1),x=()=>{navigator.clipboard.writeText(r).catch(console.error),u(!0),setTimeout((()=>u(!1)),1500)};/*#__PURE__*/return e.jsxs(e.Fragment,{children:[i?/*#__PURE__*/e.jsx(o,{...a,onClick:x,children:s}):/*#__PURE__*/e.jsx(e.Fragment,{children:s}),/*#__PURE__*/e.jsx(o,{...a,onClick:x,children:d?/*#__PURE__*/e.jsx(n,{children:/*#__PURE__*/e.jsx(c,{})}):/*#__PURE__*/e.jsx(l,{})})]})},exports.CopyableText=function({children:r,iconOnly:i,value:s,hideCopyIcon:a,iconSize:d=14,...u}){let[x,h]=t.useState(!1);/*#__PURE__*/return e.jsxs(o,{...u,onClick:()=>{navigator.clipboard.writeText(s||("string"==typeof r?r:"")).catch(console.error),h(!0),setTimeout((()=>h(!1)),1500)},children:[r," ",x?/*#__PURE__*/e.jsxs(n,{children:[/*#__PURE__*/e.jsx(c,{size:d})," ",!i&&"Copied"]}):!a&&/*#__PURE__*/e.jsx(l,{size:d})]})};
//# sourceMappingURL=CopyableText-SJxK10XO.js.map
