import{q as f,x as S,W as D,v,m as T,c as l,b as m,w as _,a as e,g as y,i as w,F as C,r as N,H as B,o as a,d as k,t as V,h as j,T as E}from"./entry.e017eb4f.js";import{_ as H}from"./nuxt-link.0da3f327.js";import{_ as K}from"./List.6437a01d.js";import{g as L}from"./useCart.0d42591f.js";import"./Image.e40f281f.js";import"./_plugin-vue_export-helper.c27b6911.js";import"./ShoppingBagIcon.938b35df.js";const W={class:"bg-white pb-8 lg:pb-16"},F={class:"mx-auto max-w-7xl overflow-hidden py-4 px-4 sm:py-8 sm:px-6 lg:px-8"},q={class:"border-b border-gray-200 pb-6 mb-6 lg:pb-10 lg:mb-12"},z={class:"lg:flex lg:justify-between"},A=e("div",null,[e("h1",{class:"text-4xl font-bold tracking-tight text-gray-900"}," Konfigurator "),e("p",{class:"mt-4 text-base text-gray-500"}," Konfigurieren Sie Ihren Wunsch-Traktor mit dem perfekten Zubhör. ")],-1),I={key:0,class:"mt-4 lg:mt-0"},M={class:"md:flex justify-between mb-6 items-center"},P={class:"text-3xl font-semibold text-gray-900"},X={__name:"index",setup(Z){const g=f(!0),c=f(null),p=S(()=>v("initData").value),h=f([]),b=t=>{var d;(d=t==null?void 0:t.vehicleCollections)==null||d.forEach(o=>{var r;const n=[];(r=o.vehicles)==null||r.forEach(i=>{i.is_offer||n.push(i)}),n.length&&h.value.push({name:o.name,href:"/modelle/"+o.slug,vehicles:n})})};b(p.value),D(p,t=>{b(t)});const u=v("cart",()=>[]);async function x(){if(!u.value||!u.value.length){c.value=null,g.value=!1;return}c.value=await L(u.value),g.value=!1}return T(async()=>{await x(),setTimeout(()=>{(document==null?void 0:document.visibilityState)==="visible"&&x()},5e3)}),(t,d)=>{const o=E,n=B,r=H,i=K;return a(),l("div",W,[m(n,null,{default:_(()=>[m(o,null,{default:_(()=>[k("Konfigurator | Solis")]),_:1})]),_:1}),e("div",F,[e("div",q,[e("div",z,[A,y(c)?(a(),l("div",I,[m(r,{to:"/konfigurator/angebot",type:"submit",class:"inline-flex max-w-xs flex-1 items-center justify-center rounded-md border border-transparent bg-sd-blue py-3 px-8 text-base font-medium text-white hover:bg-sd-blue-light focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-50"},{default:_(()=>[k(" Weiter zum Angebot ")]),_:1})])):w("",!0)])]),(a(!0),l(C,null,N(y(h),s=>(a(),l("section",{key:s.name,class:"mb-12 lg:mb-16"},[e("div",M,[e("h2",P,V(s.name),1)]),s!=null&&s.vehicles?(a(),j(i,{key:0,products:s.vehicles},null,8,["products"])):w("",!0)]))),128))])])}}};export{X as default};