import{q as f,o as s,c as i,a as _,F as v,k as b,f as c,r as p,s as h,d as u,S as g,h as A,w as y,i as x,m as S}from"./index-Cdt4oMy6.js";import{_ as I}from"./AppBreadcrumbs-D4S6z5V4.js";import{_ as k}from"./AppBanner-DMbYC2-2.js";import{A as D}from"./index-FRn5n8Ek.js";import{A as E}from"./AppCardWithDescription-C-HtozHd.js";import"./AppFilters-CU-uIOCE.js";import"./swiper-lfl8oNG_.js";/* empty css               */import"./AppPopUp-OwQEDrbP.js";const $={class:"section auto-services-section section--last section--shadow"},w={class:"container"},O={class:"wrapper"},V={__name:"index",props:{items:{type:Array,required:!0,default:()=>[]}},setup(d){return(r,n)=>(s(),i("section",$,[_("div",w,[_("div",O,[(s(!0),i(v,null,b(d.items,(o,l)=>(s(),i("div",{class:"item",key:l},[c(E,{item:o},null,8,["item"])]))),128))])])]))}},B=f(V,[["__scopeId","data-v-7db6e7a1"]]);var C={VITE_DOMAIN:"https://admin.resoleasing.com",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const L={class:"page"},H={__name:"AutoServices",setup(d){const r=p(null),n=p([]),o=p([]),l=a=>a?S.parse(a):"";return h(async()=>{const{VITE_DOMAIN:a}=C;try{const t=await u.get("/main?populate[0]=specials.banner&populate[1]=specials.cover");o.value=t.data.attributes.specials.data.map(e=>({badge:e.attributes.badge,src:a+e.attributes.cover.data.attributes.url,title:e.attributes.title,permalink:`/${g}/${e.id}`,description:e.attributes.shortDescription,category:e.attributes.vehicleCategory}))}catch(t){console.log(t)}try{u.get("/banners?populate=*&filters[type][$eq]=carServices").then(function(t){r.value=t.data[0]}).catch(function(t){console.log(t)})}catch(t){console.log(t)}try{const t=await u.get("/services?populate=*");n.value=t.data.sort((e,m)=>m.sortIndex-e.sortIndex).map(e=>({title:e.attributes.title,text:l(e.attributes.description),description:"",img:a+e.attributes.icon.data.attributes.url}))}catch(t){console.log(t)}}),(a,t)=>(s(),i("div",L,[r.value?(s(),A(k,{key:0,data:r.value},{bc:y(()=>[c(I)]),_:1},8,["data"])):x("",!0),c(B,{items:n.value},null,8,["items"]),c(D,{items:o.value},null,8,["items"])]))}};export{H as default};