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