import{r as _,o as i,c,a as e,t as k,n as j,m as se,v as te,u as ie,b as ae,d as R,e as le,f as o,w as a,g as l,h as r,i as d,j as Z,T as ne,F as m,k as v,l as re,p as g,_ as f}from"./index-Cdt4oMy6.js";import{S as h,a as b}from"./swiper-lfl8oNG_.js";import{f as oe,N as ce,T as ue}from"./free-mode-Dw32esjS.js";import{A as de}from"./AppFilters-CU-uIOCE.js";/* empty css               */import{E as z,a as G}from"./el-tab-pane-Byz9AmJe.js";import{_ as _e}from"./AppBanner-DMbYC2-2.js";import{T as pe,A as me,_ as C}from"./index-DARab7xa.js";const ve="/assets/1-C15163KW.png",he="/assets/2-BaNAu5V3.png",be="/assets/3-Zrwvt2lS.png",ge={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fe=e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 11.25L0.999985 11.25L0.999982 12.75L23 12.75L23 11.25Z",fill:"#314157"},null,-1),we=[fe],ye={key:1,width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ke=e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.25 11.7499V22H11.75V11.7499L22 11.7499V10.2499L11.75 10.2499V0H10.25V10.2499L0 10.2499V11.7499L10.25 11.7499Z",fill:"#314157"},null,-1),xe=[ke],Me=["innerHTML"],Te={__name:"AccordionItem",props:{title:{type:String,required:!0},text:{type:String,required:!0}},setup(P){const p=_(!1),S=x=>x?se.parse(x):"";return(x,M)=>(i(),c("div",{class:j(["accordion",{open:p.value}])},[e("div",{class:"accordion__header",onClick:M[0]||(M[0]=H=>p.value=!p.value)},[e("h3",null,k(P.title),1),e("span",null,[p.value?(i(),c("svg",ge,we)):(i(),c("svg",ye,xe))])]),e("div",{class:"accordion__wrap",innerHTML:S(P.text)},null,8,Me)],2))}};var Le={VITE_DOMAIN:"https://admin.resoleasing.com",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ve={class:"main-slider"},Pe={class:"container"},Se=["src"],Be={class:"progress"},qe={class:"section section--bg"},Ie={class:"container"},Ce={class:"section__header"},He=e("h2",{class:"section__title h1"},"Специальные предложения",-1),Ae=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),De={class:"slider-item__wrap"},Ne=e("div",{class:"slider-item__label"},"Специальное предложения",-1),Ee=["src"],Oe={class:"slider-item__text"},$e={class:"slider-item__title text-big"},Ue=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),Fe={class:"section"},Re={class:"container"},Ze={class:"section__header"},ze=e("h2",{class:"section__title h1"},"Условия лизинга",-1),Ge=e("span",null,[g("Оставить заявку "),e("img",{src:f})],-1),je=[Ge],Ke=["src"],We={class:"slider-item__text"},Je=["innerHTML"],Qe=["src"],Xe={class:"slider-item__text"},Ye=["innerHTML"],es=["src"],ss={class:"slider-item__text"},ts=["innerHTML"],is=["src"],as={class:"slider-item__text"},ls=["innerHTML"],ns=e("span",null,[g("Оставить заявку "),e("img",{src:f})],-1),rs=[ns],os={class:"section section--bg"},cs={class:"container"},us={class:"section__header"},ds=e("h2",{class:"section__title h1"},"Автоуслуги",-1),_s=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),ps=["src"],ms={class:"slider-item__text"},vs={class:"slider-item__title text-big"},hs=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),bs={class:"section"},gs={class:"container"},fs=e("div",{class:"section__header"},[e("div",{class:"section__title h1"},"Рассчитать предварительный платёж")],-1),ws={class:"section section--shadow"},ys={class:"container"},ks={class:"section__header"},xs=e("h2",{class:"section__title h1"},"Бонусные программы",-1),Ms=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),Ts=["src"],Ls={class:"slider-item__text"},Vs={class:"slider-item__title text-big"},Ps=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),Ss={class:"section section--last section--bg"},Bs={class:"container"},qs={class:"section__header"},Is=e("h2",{class:"section__title h1"},"Распродажа",-1),Cs=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),Hs=e("div",{class:"slider-item__wrap"},[e("img",{class:"slider-item__img center",src:ve}),e("div",{class:"slider-item__text bg-none"},[e("div",{class:"slider-item__title text-big"},"Легковой транспорт")])],-1),As=e("div",{class:"slider-item__wrap"},[e("img",{class:"slider-item__img center",src:he}),e("div",{class:"slider-item__text bg-none"},[e("div",{class:"slider-item__title text-big"},"Грузовой транспорт")])],-1),Ds=e("div",{class:"slider-item__wrap"},[e("img",{class:"slider-item__img center",src:be}),e("div",{class:"slider-item__text bg-none"},[e("div",{class:"slider-item__title text-big"},"Спецтехника")])],-1),Ns=e("span",null,[g("Смотреть все "),e("img",{src:f})],-1),Es={class:"questions-section"},Os={class:"container"},$s={class:"questions-section__header"},Us=e("h2",{class:"h1"},"Есть вопрос?",-1),Js={__name:"HomeView",setup(P){const p=te.useMq(),S=ie(),x=_([]),M=_(null),H=u=>{M.value=u},A=[oe,ce,ue,de],D=_(0),K=(u,n,t)=>{D.value=(1-t)*100},B=_(!1),W=(u,n)=>{const t=u.target;if(!t.classList.contains("swiper-slide")||B.value)return!1;if(!t.classList.contains("swiper-slide-fully-visible")){const{activeIndex:s}=M.value,T=s<n?s+1:s-1;M.value.slideTo(T),B.value=!0,setTimeout(()=>{B.value=!1},300)}},J=_([{label:"Легковой транспорт",value:"passenger"},{label:"Грузовой транспорт",value:"commercial"},{label:"Спецтехника",value:"specialMachinery"}]),L=_("passenger"),Q=u=>{L.value=u.paneName,I.value=q.value.filter(n=>n.attributes.vehicleCategory===L.value)},q=_([]),I=_([]),N=_([]),E=_([]),X=_([{label:"Легковой транспорт",value:"passenger"},{label:"Грузовой транспорт",value:"freight"},{label:"Спецтехника",value:"special_equipment"},{label:"Б/У автомобили",value:"used_cars"}]),w=_("passenger");_([]);const O=_([]),V=()=>O.value.filter(u=>u.type===w.value),y=_({main:[],decor:[],insurance:[]}),$=_("main"),Y=u=>{$.value=u};ae(()=>{const{VITE_DOMAIN:u}=Le;R.get("/main?populate[0]=specials.banner&populate[1]=specials.cover&populate[2]=banners.image&populate[3]=faqs&populate[4]=bonuses.icon&populate[5]=services.icon").then(function(n){x.value=n.data.attributes.banners.data,q.value=n.data.attributes.specials.data,I.value=q.value.filter(t=>t.attributes.vehicleCategory===L.value),n.data.attributes.faqs.data.forEach(t=>{t.attributes.type==="Oбщие"?y.value.main.push(t.attributes):t.attributes.type==="Страхование"?y.value.insurance.push(t.attributes):y.value.decor.push(t.attributes)}),N.value=n.data.attributes.bonuses.data.sort((t,s)=>s.attributes.sortIndex-t.attributes.sortIndex).map(t=>({title:t.attributes.title,description:t.attributes.shortDecsription,src:u+t.attributes.icon.data.attributes.url})),E.value=n.data.attributes.services.data.sort((t,s)=>s.attributes.sortIndex-t.attributes.sortIndex).map(t=>({title:t.attributes.title,description:t.attributes.shortDescription,src:u+t.attributes.icon.data.attributes.url}))}).catch(function(n){console.log(n)}),R.get("/leasing-terms?populate=*").then(function(n){O.value=n.data.sort((t,s)=>s.sortIndex-t.sortIndex).map(t=>({title:t.attributes.title,type:t.attributes.type,img:u+t.attributes.icon.data.attributes.url,link:""}))}).catch(function(n){console.log(n)})});const U=u=>"https://admin.resoleasing.com"+u,F=()=>{S.commit("OPEN_LEASING_MODAL",{isOpen:!0,name:""})};return(u,n)=>{const t=le("router-link");return i(),c(m,null,[e("div",Ve,[o(l(b),{"slides-per-view":1,thumbs:{swiper:M.value},modules:A,autoplay:{delay:1e4,disableOnInteraction:u.fasle},onAutoplayTimeLeft:K,class:"main-slider__item"},{default:a(()=>[(i(!0),c(m,null,v(x.value,s=>(i(),r(l(h),{key:s.id},{default:a(()=>[o(_e,{data:s},null,8,["data"])]),_:2},1024))),128))]),_:1},8,["thumbs","autoplay"]),e("div",Pe,[o(l(b),{onSwiper:H,spaceBetween:30,slidesPerView:"auto",freeMode:!0,watchSlidesProgress:!0,modules:A,class:"main-slider__thumbs"},{default:a(()=>[(i(!0),c(m,null,v(x.value,(s,T)=>(i(),r(l(h),{key:s.id,onMouseover:ee=>W(ee,T)},{default:a(()=>[e("div",null,[e("img",{src:U(s.attributes.image.data.attributes.url),class:j({fit:!s.attributes.is_animated}),alt:""},null,10,Se),e("span",null,k(s.attributes.title),1)]),e("div",Be,[e("span",{style:re({width:D.value+"%"})},null,4)])]),_:2},1032,["onMouseover"]))),128))]),_:1})])]),e("div",qe,[e("div",Ie,[e("div",Ce,[He,l(p).mdPlus?(i(),r(t,{key:0,to:{path:"special"},class:"btn-all"},{default:a(()=>[Ae]),_:1})):d("",!0)]),o(l(G),{modelValue:L.value,"onUpdate:modelValue":n[0]||(n[0]=s=>L.value=s),type:"card",onTabClick:n[1]||(n[1]=s=>Q(s)),class:"border"},{default:a(()=>[(i(!0),c(m,null,v(J.value,s=>(i(),r(l(z),{key:s.value,label:s.label,name:s.value},null,8,["label","name"]))),128))]),_:1},8,["modelValue"]),o(l(b),{slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(I.value,s=>(i(),r(l(h),{key:s.id},{default:a(()=>[o(t,{to:{name:"specialItem",params:{id:s.id}},class:"slider-item slider-item--1"},{default:a(()=>[e("div",De,[Ne,s.attributes.cover.data?(i(),c("img",{key:0,class:"slider-item__img",src:U(s.attributes.cover.data.attributes.url)},null,8,Ee)):d("",!0),e("div",Oe,[e("div",$e,k(s.attributes.title),1),e("p",null,k(s.attributes.shortDescription),1)])])]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),l(p).smMinus?(i(),r(t,{key:0,to:{path:"special"},class:"btn btn--big"},{default:a(()=>[Ue]),_:1})):d("",!0)])]),e("div",Fe,[e("div",Re,[e("div",Ze,[ze,l(p).mdPlus?(i(),c("a",{key:0,href:"#",class:"btn-all",onClick:Z(F,["prevent"])},je)):d("",!0)]),o(l(G),{modelValue:w.value,"onUpdate:modelValue":n[2]||(n[2]=s=>w.value=s),type:"card",onTabClick:n[3]||(n[3]=s=>w.value=s.paneName)},{default:a(()=>[(i(!0),c(m,null,v(X.value,s=>(i(),r(l(z),{key:s.value,label:s.label,name:s.value},null,8,["label","name"]))),128))]),_:1},8,["modelValue"]),o(ne,null,{default:a(()=>[w.value==="passenger"?(i(),r(l(b),{key:0,slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(V(),s=>(i(),r(l(h),{key:s.link},{default:a(()=>[o(t,{to:{path:"leasing-terms"},class:"slider-item slider-item--2"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.img},null,8,Ke),e("div",We,[e("div",{class:"slider-item__title text-big",innerHTML:s.title},null,8,Je)])]),_:2},1024)]),_:2},1024))),128))]),_:1})):d("",!0),w.value==="freight"?(i(),r(l(b),{key:1,slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(V(),s=>(i(),r(l(h),{key:s.link},{default:a(()=>[o(t,{to:{path:"leasing-terms"},class:"slider-item slider-item--2"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.img},null,8,Qe),e("div",Xe,[e("div",{class:"slider-item__title text-big",innerHTML:s.title},null,8,Ye)])]),_:2},1024)]),_:2},1024))),128))]),_:1})):d("",!0),w.value==="special_equipment"?(i(),r(l(b),{key:2,slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(V(),s=>(i(),r(l(h),{key:s.link},{default:a(()=>[o(t,{to:{path:"leasing-terms"},class:"slider-item slider-item--2"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.img},null,8,es),e("div",ss,[e("div",{class:"slider-item__title text-big",innerHTML:s.title},null,8,ts)])]),_:2},1024)]),_:2},1024))),128))]),_:1})):d("",!0),w.value==="used_cars"?(i(),r(l(b),{key:3,slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(V(),s=>(i(),r(l(h),{key:s.link},{default:a(()=>[o(t,{to:{path:"leasing-terms"},class:"slider-item slider-item--2"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.img},null,8,is),e("div",as,[e("div",{class:"slider-item__title text-big",innerHTML:s.title},null,8,ls)])]),_:2},1024)]),_:2},1024))),128))]),_:1})):d("",!0)]),_:1}),l(p).smMinus?(i(),c("a",{key:0,href:"#",class:"btn btn--big",onClick:Z(F,["prevent"])},rs)):d("",!0)])]),e("div",os,[e("div",cs,[e("div",us,[ds,l(p).mdPlus?(i(),r(t,{key:0,to:{path:"/services"},class:"btn-all"},{default:a(()=>[_s]),_:1})):d("",!0)]),o(l(b),{slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(E.value,(s,T)=>(i(),r(l(h),{key:T},{default:a(()=>[o(t,{to:{path:"/services"},class:"slider-item slider-item--3"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.src},null,8,ps),e("div",ms,[e("div",vs,k(s.title),1),e("p",null,k(s.description),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1}),l(p).smMinus?(i(),r(t,{key:0,to:{path:"/services"},class:"btn btn--big"},{default:a(()=>[hs]),_:1})):d("",!0)])]),e("div",bs,[e("div",gs,[fs,o(me)])]),e("div",ws,[e("div",ys,[e("div",ks,[xs,l(p).mdPlus?(i(),r(t,{key:0,to:{path:"/bonus"},class:"btn-all"},{default:a(()=>[Ms]),_:1})):d("",!0)]),o(l(b),{slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[(i(!0),c(m,null,v(N.value,(s,T)=>(i(),r(l(h),{key:T},{default:a(()=>[o(t,{to:{path:"/bonus"},class:"slider-item slider-item--3"},{default:a(()=>[e("img",{class:"slider-item__img",src:s.src},null,8,Ts),e("div",Ls,[e("div",Vs,k(s.title),1),e("p",null,k(s.description),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1}),l(p).smMinus?(i(),r(t,{key:0,to:{path:"/bonus"},class:"btn btn--big"},{default:a(()=>[Ps]),_:1})):d("",!0)])]),e("div",Ss,[e("div",Bs,[e("div",qs,[Is,l(p).mdPlus?(i(),r(t,{key:0,to:{path:"/sale"},class:"btn-all"},{default:a(()=>[Cs]),_:1})):d("",!0)]),o(l(b),{slidesPerView:"auto","space-between":10,breakpoints:{1536:{spaceBetween:30}},class:"swiper-visible swiper-width-auto"},{default:a(()=>[o(l(h),null,{default:a(()=>[o(t,{to:{name:"saleList",query:{type:"passenger"}},class:"slider-item slider-item--4"},{default:a(()=>[Hs]),_:1})]),_:1}),o(l(h),null,{default:a(()=>[o(t,{to:{name:"saleList",query:{type:"cargo"}},class:"slider-item slider-item--4"},{default:a(()=>[As]),_:1})]),_:1}),o(l(h),null,{default:a(()=>[o(t,{to:{name:"saleList",query:{type:"special"}},class:"slider-item slider-item--4"},{default:a(()=>[Ds]),_:1})]),_:1})]),_:1}),l(p).smMinus?(i(),r(t,{key:0,to:{path:"/sale"},class:"btn btn--big"},{default:a(()=>[Ns]),_:1})):d("",!0)])]),e("div",Es,[e("div",Os,[e("div",$s,[Us,o(pe,{onOnChange:n[4]||(n[4]=s=>Y(s))},{default:a(()=>[y.value.decor.length+y.value.insurance.length>0?(i(),r(C,{key:0,name:"main",label:"Общие"})):d("",!0),y.value.decor.length>0?(i(),r(C,{key:1,name:"decor",label:"Оформление"})):d("",!0),y.value.insurance.length>0?(i(),r(C,{key:2,name:"insurance",label:"Страхование"})):d("",!0)]),_:1})]),(i(!0),c(m,null,v(y.value[$.value],s=>(i(),r(Te,{key:s.createdAt,title:s.title,text:s.text},null,8,["title","text"]))),128))])])],64)}}};export{Js as default};