import{v as m,r as l,b as w,d as L,e as k,o,c as n,i as u,a as e,F as _,k as x,f as p,g as V,t as g,w as y,p as M}from"./index-Cdt4oMy6.js";import{_ as b}from"./AppPagination-BbKWO8Aw.js";const B={key:0,class:"loader"},C={key:1,class:"news-page"},N=e("h1",{class:"h1"},"Вакансии",-1),S={class:"cards"},q={class:"cards__item-date"},z={class:"cards__item-text"},P={class:"cards__item-title"},T=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("g",{"clip-path":"url(#clip0_4565_44816)"},[e("path",{d:"M24.1844 12.0004L12.4749 2.41992L11.5251 3.58086L20.8989 11.2504L9 11.2504V12.7504L20.8989 12.7504L11.5251 20.4199L12.4749 21.5809L24.1844 12.0004Z",fill:"#314157"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 12.75L2 12.75L2 11.25L7 11.25L7 12.75Z",fill:"#017338"})]),e("defs",null,[e("clipPath",{id:"clip0_4565_44816"},[e("rect",{width:"24",height:"24",fill:"white"})])])],-1),Z={__name:"VacanciesView",setup($){const v=m.useMq(),s=l(!0),c=l({}),i=l({page:1,pageCount:0,pageSize:8,total:0}),h=a=>{i.value.page=a,s.value=!0,r()};w(()=>{r()});const r=()=>{L.get(`/vacancies/?populate=*&pagination[pageSize]=${i.value.pageSize}&pagination[page]=${i.value.page}`).then(function(a){c.value=a.data,i.value=a.meta.pagination,s.value=!1,window.scrollTo({top:0,behavior:"smooth"})}).catch(function(a){s.value=!1,console.log(a)})};return(a,d)=>{const f=k("router-link");return o(),n(_,null,[s.value?(o(),n("div",B)):u("",!0),s.value?u("",!0):(o(),n("div",C,[N,e("div",S,[(o(!0),n(_,null,x(c.value,t=>(o(),n("div",{class:"cards__item",key:t.id},[e("div",q,g(t.attributes.city),1),e("div",z,[e("div",P,g(t.attributes.jobTitle),1),p(f,{to:{name:"singleVacancy",params:{id:t.id}},class:"cards__item-link"},{default:y(()=>[M(" Читать "),T]),_:2},1032,["to"])])]))),128))]),p(b,{pagination:i.value,center:!!V(v).smMinus,onOnChangePage:d[0]||(d[0]=t=>h(t))},null,8,["pagination","center"])]))],64)}}};export{Z as default};