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