(()=>{function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var t=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,o,a;return n=t,(o=[{key:"init",value:function(){$(document).on("click",".btn-trigger-active-theme",(function(e){e.preventDefault();var t=$(e.currentTarget);Botble.showButtonLoading(t),$httpClient.make().post(t.data("url")).then((function(e){var t=e.data;Botble.showSuccess(t.message),window.location.reload()})).finally((function(){Botble.hideButtonLoading(t)}))})),$(document).on("click",".btn-trigger-remove-theme",(function(e){e.preventDefault();var t=$(e.currentTarget);$("#confirm-remove-theme-button").data("theme",t.data("theme")).data("url",t.data("url")),$("#remove-theme-modal").modal("show")})),$(document).on("click","#confirm-remove-theme-button",(function(e){e.preventDefault();var t=$(e.currentTarget);Botble.showButtonLoading(t),$httpClient.make().post(t.data("url")).then((function(e){var t=e.data;Botble.showSuccess(t.message),window.location.reload()})).finally((function(){Botble.hideButtonLoading(t),$("#remove-theme-modal").modal("hide")}))}))}}])&&e(n.prototype,o),a&&e(n,a),Object.defineProperty(n,"prototype",{writable:!1}),t}();$((function(){(new t).init()}))})();