1import{_ as B}from"./DhV_9hrn.js";import{d as A,o as u,c as v,u as T,Q as U,R as O,r as g,g as V,i as y,h as $,p as j,j as q,m as M,S as z,P as r,a as S,f as l,t as b,v as o,b as G,e as H,G as Q,z as Y,T as Z,k as J,M as K,L as E,l as W}from"./C_OTGDI3.js";import"./BMRkw-Dc.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="369715b6-4357-4afe-ac76-b6a6b10f32c7",e._sentryDebugIdIdentifier="sentry-dbid-369715b6-4357-4afe-ac76-b6a6b10f32c7")}catch{}const X={"aria-hidden":"true",hidden:""},ee=A({__name:"FavoriteListPrivateLease",setup(e){return(t,n)=>(u(),v("div",X))}}),te=Object.assign(ee,{__name:"FavoriteListPrivateLease"});function F(e){return!e.includes(":")}function se(e,t){if(!t)return{list:e,removed:0};const n=e.filter(a=>!F(a)||t.includes(a));return{list:n,removed:e.length-n.length}}const oe={class:"container py-10"},ae={class:"flex flex-row justify-between gap-10 pb-8"},ne={class:"max-w-[800px]"},ie={class:"text-display-sm"},ce={key:0},re={class:"mt-4"},le={key:1,class:"mt-4"},ve=A({__name:"favorite",async setup(e){let t,n;const a=T(),{pushFavoritesOverviewEvent:R}=U(),P=O(),c=g(a.favoriteList??[]),N=g(a.compareList??[]),_=E(()=>c.value.filter(F)),{t:i,localeProperties:k}=V();y(()=>a.favoriteList,s=>{c.value=s}),y(()=>a.compareList,s=>{N.value=s});const I=g(!1),{vehicleSearchResultsURL:C}=$(),L=j(),{data:p}=([t,n]=q(()=>J(()=>C(),{query:{"vehicle.id":_,_limit:E(()=>_.value.length||1)},transform:s=>_.value.length===0?{vehicles:[],amount:0}:{vehicles:K(s.results,L.stock.locationDisplayFields,k.value.language??k.value.code,void 0,L.stock.showPkwEnvkvImageAltSuffix,i),amount:s.num_results},key:"favorites"},"$TsZguOxNO6")),t=await t,n(),t);y([p,I],([s,x])=>{if(x)return;const m=s?.vehicles?s.vehicles.map(h=>h.id):null,{list:f,removed:d}=se(c.value,m);d>0&&(W({message:i("vehicle.favorite.notifications.existing_deleted",{amount:d}),type:"warning"}),a.setFavoriteList(f)),_.value.length===0&&(I.value=!0)},{deep:!0,immediate:!0});const{stockSlug:w}=M();z(()=>{R(String(P))});const D=[r.PURCHASE,r.BUSINESS_LEASE,r.BUSINESS_FINANCE,r.PRIVATE_FINANCE,r.PRIVATE_LEASE];return(s,x)=>{const m=B,f=Y,d=Z,h=te;return u(),v(Q,null,[S(m),l("div",oe,[l("div",ae,[l("div",ne,[l("h1",ie,b(o(i)("vehicle.favorite.title")),1),o(c).length===0?(u(),v("div",ce,[l("p",re,b(o(i)("vehicle.favorite.empty.description")),1),S(f,{label:o(i)("vehicle.favorite.empty.cta"),to:`/${o(w)}`,class:"mt-8"},null,8,["label","to"])])):(u(),v("p",le,b(o(i)("vehicle.favorite.description",{amount:o(c).length})),1))])]),o(p)?.vehicles?.length?(u(),G(d,{key:0,items:o(p)?.vehicles,"price-display":D,"target-url":`/${o(w)}`},null,8,["items","target-url"])):H("",!0),S(h)])],64)}}});export{ve as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.