"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react/jsx-runtime"),v=require("@styled/tokens"),f=require("../icons/ico-checkmark.js"),p=require("../icons/ico-copy.js"),t=require("react"),i=require("../primitives/button.js");const s=({value:o,showText:l,color:c,onCopy:n})=>{const a=c||v.token("colors.text.primary"),[e,u]=t.useState(!1);t.useEffect(()=>{e&&setTimeout(()=>{u(!1)},2500)},[e]);const d=t.useCallback(()=>{n(o),u(!0)},[o]);return r.jsx(i.default,{label:l?e?"Copied!":"Copy":void 0,variant:"text",onPress:d,iconSize:e?12:16,children:r.jsx(i.default.LeadingIcon,{children:e?r.jsx(f.default,{color:a}):r.jsx(p.default,{color:a})})})};s.displayName="CopyButton",exports.default=s;
//# sourceMappingURL=copy-button.js.map
