"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),React=require("react");const useCoupon=e=>{let t=core.useEditorMode(),{defaultLabel:o,copyContent:r,clickedLabel:c}=e??{},[u,a]=React.useState(!1),[s,i]=React.useState(o);React.useEffect(()=>{i(o)},[o]);let n=()=>{i(c),a(!0),navigator.clipboard.writeText(r??"").catch(function(e){console.error("Failed to copy text: ",e)}),setTimeout(()=>{i(o),a(!1)},1e3)};return{changeStateILP:n,defaultLabelState:s,mode:t,dataActive:u}};exports.default=useCoupon;
