(()=>{function e(e,o){for(var n=0;n<o.length;n++){var r=o[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function o(){!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,o)}var n,r,t;return n=o,(r=[{key:"init",value:function(){$(document).on("click",".approve-vendor-for-selling-button",(function(e){e.preventDefault(),$("#confirm-approve-vendor-for-selling-button").data("action",$(e.currentTarget).prop("href")),$("#approve-vendor-for-selling-modal").modal("show")})),$(document).on("click","#confirm-approve-vendor-for-selling-button",(function(e){e.preventDefault();var o=$(e.currentTarget);o.addClass("button-loading"),$.ajax({type:"POST",cache:!1,url:o.data("action"),success:function(e){e.error?Botble.showError(e.message):(Botble.showSuccess(e.message),window.location.href=route("marketplace.unverified-vendors.index")),o.removeClass("button-loading"),o.closest(".modal").modal("hide")},error:function(e){Botble.handleError(e),o.removeClass("button-loading")}})}))}}])&&e(n.prototype,r),t&&e(n,t),Object.defineProperty(n,"prototype",{writable:!1}),o}();$(document).ready((function(){(new o).init()}))})();