import{p}from"./MoneyFormat-3-7-103.js";import{d as u,s as l,S as d}from"./vendor-3-7-103.js";const f=u("UiStore",{state:()=>({loading:!1}),actions:{async hideRatingMessage(){return await w.post("hide_notice").then(()=>{window.location.reload()})}}}),t=(e,o,a)=>{const s=window.gpos.prefix,i=window.gpos.nonce,c=`${window.gpos.ajaxurl}?action=${s}_${o}&_wpnonce=${i}`,{loading:r}=l(f(p));return window.jQuery.ajax({url:c,type:e,dataType:"json",contentType:"application/json",accept:"application/json",data:a?JSON.stringify(a):!1,beforeSend:()=>{r.value=!0},success:()=>{r.value=!1},error:n=>{r.value=!1,n.statusText!=="abort"&&d.fire({html:n.responseJSON.error_message??n.responseJSON.data.error_message,icon:"error",confirmButtonText:window.gpos.alert_texts.ok,confirmButtonColor:"#C81E1E"})}})},w={get(e,o){return t("GET",e,o)},post(e,o){return t("POST",e,o)},delete(e,o){return t("DELETE",e,o)},put(e,o){return t("PUT",e,o)},patch(e,o){return t("PATCH",e,o)}};export{w as a,f as u};
