import{q as v,v as N,m as S,c as r,b as i,w as a,a as n,g as t,i as w,h as g,d as s,H as B,o,T as K}from"./entry.e017eb4f.js";import{_ as j}from"./nuxt-link.0da3f327.js";import{_ as z}from"./Spinner.e690f222.js";import{_ as V}from"./List.6437a01d.js";import{g as H}from"./useCart.0d42591f.js";import"./_plugin-vue_export-helper.c27b6911.js";import"./Image.e40f281f.js";import"./ShoppingBagIcon.938b35df.js";const W={class:"bg-white pb-8 lg:pb-16"},Z={class:"mx-auto max-w-7xl overflow-hidden py-4 px-4 sm:py-8 sm:px-6 lg:px-8"},F={class:"border-b border-gray-200 pb-6 mb-6 lg:pb-10 lg:mb-12"},L={class:"lg:flex lg:justify-between"},M=n("div",null,[n("h1",{class:"text-4xl font-bold tracking-tight text-gray-900"}," Konfigurator: Angebot anfordern "),n("p",{class:"mt-4 text-base text-gray-500"}," Konfigurieren Sie Ihren Wunsch-Traktor mit dem perfekten Zubhör. ")],-1),P={key:0,class:"mt-4 lg:mt-0"},R={key:1,class:"max-w-3xl prose"},$={key:2},q=n("h2",{class:"text-3xl font-bold tracking-tight text-gray-900 mb-6"}," Traktoren im Angebotskorb ",-1),D={key:1},E=n("h2",{class:"text-3xl font-bold tracking-tight text-gray-900 mb-6 mt-10 lg:mt-16"}," Zubehör im Angebotskorb ",-1),I={key:3},G={key:4,class:"mt-14 border-t border-gray-200 pt-12 justify-end flex"},re={__name:"index",setup(J){const l=v(!0),e=v(null),u=N("cart",()=>[]);async function d(){if(!u.value||!u.value.length){e.value=null,l.value=!1;return}e.value=await H(u.value),l.value=!1}return S(async()=>{await d()}),(O,Q)=>{var f,_,h,b,p,x,k,y;const A=K,T=B,c=j,C=z,m=V;return o(),r("div",W,[i(T,null,{default:a(()=>[i(A,null,{default:a(()=>[s("Konfigurator | Solis")]),_:1})]),_:1}),n("div",Z,[n("div",F,[n("div",L,[M,t(e)?(o(),r("div",P,[i(c,{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:a(()=>[s(" Weiter zum Angebot ")]),_:1})])):w("",!0)])]),t(l)?(o(),g(C,{key:0,big:"",black:""})):!((f=t(e))!=null&&f.vehicles)&&!((_=t(e))!=null&&_.vehicles.length)&&!((h=t(e))!=null&&h.accessories)&&!((b=t(e))!=null&&b.accessories.length)?(o(),r("div",R,[s(" Aktuell befinden sich noch keine Produkte in ihrem Angebotskorb. Durchstöbern Sie unseren Traktoren-Auswahl im Bereich "),i(c,{to:"/modelle"},{default:a(()=>[s(" Modelle ")]),_:1}),s(" oder entdecken Sie unsere "),i(c,{to:"/neuheiten"},{default:a(()=>[s(" Neuheiten ")]),_:1}),s(". ")])):(o(),r("div",$,[q,(p=t(e))!=null&&p.vehicles&&((x=t(e))!=null&&x.vehicles.length)?(o(),g(m,{key:0,products:t(e).vehicles,bigger:"","is-configurator":"",onRemoveFromCart:d},null,8,["products"])):(o(),r("div",D," Keine Traktoren hinzugefügt ")),E,(k=t(e))!=null&&k.accessories&&((y=t(e))!=null&&y.accessories.length)?(o(),g(m,{key:2,products:t(e).accessories,"is-accessory":"","is-configurator":"",onRemoveFromCart:d},null,8,["products"])):(o(),r("div",I," Kein Zubehör hinzugefügt ")),t(e)?(o(),r("div",G,[i(c,{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:a(()=>[s(" Weiter zum Angebot ")]),_:1})])):w("",!0)]))])])}}};export{re as default};