const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./B1HO5Dud.js","./pvhYMo2c.js","./swiper-vue.DJHdZmOr.css"])))=>i.map(i=>d[i]);
import{f as L,b as x,g as A,h as I}from"./9wDxnFtt.js";import{b as e}from"./pvhYMo2c.js";const B=L("career",()=>{const{locale:m}=x(),{$axios:c}=A(),r=e({}),o=e(!1),n=e(!0),l=e(!1);let i=e();const v=e(!1),u=e([]);let p=e(),d=e(1),f=e();async function g(s,a,_,w){o.value=!0;try{let t=new FormData;if(t.append("name",s.name),t.append("phone",`+966${s.phone}`),t.append("email",s.email),t.append("cv",s.cv),(await c.post(`career/store/${_}`,t)).status>=200){o.value=!1,r.value=void 0,w=null,i.value=!1;const y=await I(()=>import("./B1HO5Dud.js"),__vite__mapDeps([0,1,2]),import.meta.url),{createToast:C}=y;C(m.value=="ar"?"تم التواصل بنجاح ":"Communication was successful",{toastBackgroundColor:"#00A0B4",position:"top-right",type:"success",transition:"bounce",showIcon:"true",timeout:3e3}),a({values:{email:"",name:"",cv:"",phone:""},errors:{}})}}catch(t){t.response&&(o.value=!1,r.value=t.response.data.errors)}}async function h(s){l.value=!0;try{const a=await c.get("career",{params:{page:s}});a.status>=200&&(n.value=!1,u.value=[...u.value,...a.data.data],p.value=a.data.meta.total,f.value=a.data.meta.per_page,l.value=!1)}catch(a){a.response&&(n.value=!1)}}return{errors:r,isLoading:o,pendingState:v,isLoading2:n,getContact:g,careers:u,total:p,isLoading3:l,per_page:f,page:d,active:i,getCareer:h}});export{B as u};
