import{aN as p,bd as h}from"./app-DGDivIsO.js";const g=d=>{const{url:f,data:i,success:l,error:c,t:u}=d;var t={};p(i,function(e,r){e==null?t[r]=null:t[r]=e}),axiosFront.post(f,t).then(e=>{l(e.data)}).catch(e=>{const r=e.data,a=e.status;var n={};if(a==422){if(r.error&&typeof r.error.details<"u")for(var o=Object.keys(r.error.details),s=0;s<o.length;s++){var m=o[s].replace(".","\\.");n[m]={required:!0,message:r.error.details[o[s]][0]}}c(n)}else a==406?c(r):a==403&&h.error({message:u("common.success")})}).then(()=>{})};export{g as p};
