import{q as I,r as o,s as S,d as b,e as T,o as l,c as u,h as p,w as _,i as f,a as t,f as h,g,F as k,k as y,t as v,B,C as E}from"./index-Cdt4oMy6.js";import{_ as M}from"./AppBanner-DMbYC2-2.js";import{E as N,a as D}from"./el-tab-pane-Byz9AmJe.js";import{_ as $}from"./AppBreadcrumbs-D4S6z5V4.js";const q=r=>(B("data-v-abd1c39c"),r=r(),E(),r),F={class:"section section--last section--shadow"},U={class:"container"},L=q(()=>t("h2",{class:"h1"},"Специальные предложениÑ",-1)),O={class:"specials"},P={class:"special-item__wrap"},j={class:"special-item__label"},z=["src"],A={class:"special-item__text"},G={class:"special-item__title"},H={__name:"SpecialView",setup(r){const m=o("all"),d=o({}),C=o([{label:"Ð’Ñе",value:"all"},{label:"Легковой транÑпорт",value:"passenger"},{label:"Грузовой транÑпорт",value:"commercial"},{label:"Спецтехника",value:"specialMachinery"},{label:"ÐвтобуÑÑ‹",value:"buses"},{label:"Прицепы",value:"trailers"}]),c=o(""),V=a=>{c.value=a,c.value!=="all"?n.value=i.value.filter(s=>s.attributes.vehicleCategory===c.value):n.value=i.value},i=o([]),n=o([]);S(()=>{b.get("/banners?populate=*&filters[type][$eq]=specialOffers").then(function(a){d.value=a.data[0]}).catch(function(a){console.log(a)}),b.get("/specials/?populate=*&sort=sortIndex").then(function(a){i.value=a.data,c.value?n.value=i.value.filter(s=>s.attributes.vehicleCategory===c.value):n.value=i.value}).catch(function(a){console.log(a)})});const w=a=>"https://admin.resoleasing.com"+a;return(a,s)=>{const x=T("router-link");return l(),u("div",null,[d.value.id?(l(),p(M,{key:0,data:d.value},{bc:_(()=>[h($)]),_:1},8,["data"])):f("",!0),t("div",F,[t("div",U,[L,h(g(D),{modelValue:m.value,"onUpdate:modelValue":s[0]||(s[0]=e=>m.value=e),type:"card",onTabClick:s[1]||(s[1]=e=>V(e.paneName))},{default:_(()=>[(l(!0),u(k,null,y(C.value,e=>(l(),p(g(N),{key:e.value,label:e.label,name:e.value},null,8,["label","name"]))),128))]),_:1},8,["modelValue"]),t("div",O,[(l(!0),u(k,null,y(n.value,e=>(l(),p(x,{to:{name:"specialItem",params:{id:e.id}},class:"special-item",key:e.id},{default:_(()=>[t("div",P,[t("div",j,v(e.attributes.badge),1),e.attributes.cover.data?(l(),u("img",{key:0,class:"special-item__img",src:w(e.attributes.cover.data.attributes.url)},null,8,z)):f("",!0),t("div",A,[t("div",G,v(e.attributes.title),1),t("p",null,v(e.attributes.shortDescription),1)])])]),_:2},1032,["to"]))),128))])])])])}}},W=I(H,[["__scopeId","data-v-abd1c39c"]]);export{W as default};