import{useEditorMode as e}from"@gem-sdk/core";import{useState as t,useEffect as o}from"react";let r=r=>{let a=e(),{defaultLabel:c,copyContent:i,clickedLabel:n}=r??{},[l,m]=t(!1),[p,u]=t(c);return o(()=>{u(c)},[c]),{changeStateILP:()=>{u(n),m(!0),navigator.clipboard.writeText(i??"").catch(function(e){console.error("Failed to copy text: ",e)}),setTimeout(()=>{u(c),m(!1)},1e3)},defaultLabelState:p,mode:a,dataActive:l}};export{r as default};
