"use strict";functione(e,r){returna(e)||o(e,r)||n(e,r)||t()}functiont(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionn(e,t){if(e){if("string"==typeofe)returnr(e,t);varn=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void0}}functionr(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}functiono(e,t){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e)){varn=[],r=!0,o=!1,a=void0;try{for(varu,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(c){o=!0,a=c}finally{try{r||null==s.return||s.return()}finally{if(o)throwa}}returnn}}functiona(e){if(Array.isArray(e))returne}functionu(e,t,n,r,o,a,u){try{vars=e[a](u),c=s.value}catch(i){returnvoidn(i)}s.done?t(c):Promise.resolve(c).then(r,o)}functions(e){returnfunction(){vart=this,n=arguments;returnnewPromise(function(r,o){vara=e.apply(t,n);functions(e){u(a,r,o,s,c,"next",e)}functionc(e){u(a,r,o,s,c,"throw",e)}s(void0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;varc,i="1.1.0",l={buttonsToggled:!0},g="body.gm-toggle-messages-buttons .buttons-3JBrkn {\n display: none;\n}",d=function(){vare=s(regeneratorRuntime.mark(functione(t){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:returne.prev=0,e.next=3,goosemod.patcher.contextMenu.remove("toggle-message-buttons");case3:goosemod.patcher.contextMenu.add("textarea-context",{id:"toggle-message-buttons",label:"".concat(t?"Disable":"Enable"," Buttons"),action:function(){l.buttonsToggled=!l.buttonsToggled,d(l.buttonsToggled),document.body.classList[t?"add":"remove"]("gm-toggle-messages-buttons")}}),e.next=10;break;case6:e.prev=6,e.t0=e.catch(0),goosemodScope.showToast("An error has ocurred!",{type:"error"}),goosemodScope.logger.debug(e.t0);case10:case"end":returne.stop()}},e,null,[[0,6]])}));returnfunction(t){returne.apply(this,arguments)}}(),m={goosemodHandlers:{onImport:function(){vare=s(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:(c=document.createElement("style")).appendChild(document.createTextNode(g)),document.head.appendChild(c),d(l.buttonsToggled);case4:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onRemove:function(){vare=s(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:goosemodScope.patcher.contextMenu.remove("toggle-message-buttons"),document.body.classList.remove("gm-toggle-messages-buttons"),c.remove();case3:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),getSettings:function(){return[l]},loadSettings:function(t){varn=e(t,1)[0];d((l=n).buttonsToggled),document.body.classList[l.buttonsToggled?"remove":"add"]("gm-toggle-messages-buttons")}}};exports.default=m;