import{a,t as o}from"./toast-BolBYJGe.js";import{$ as e,j as i}from"./jquery-BJllTr_o.js";import"./mapbox-Cpj98o6Y.js";e(function(){e(".handle-action").on("click",function(r){e(this).find(".btn-spinner").removeClass("hidden"),e(this).find(".btn-text").addClass("hidden");let t=new FormData;t.append("status",e(this).data("status")),t.append("_method","PUT"),i.ajax({url:e(this).data("action"),method:"POST",data:t,processData:!1,contentType:!1,headers:{"X-CSRF-TOKEN":e('meta[name="csrf-token"]').attr("content")},success:function(s){o(s==null?void 0:s.message),e(self).find(".btn-spinner").addClass("hidden"),e(self).find(".btn-text").removeClass("hidden"),location.reload()},error:function(s){const n=s.responseJSON.message;n&&a(n),e(self).find(".btn-spinner").addClass("hidden"),e(self).find(".btn-text").removeClass("hidden")}})})});
