import{d as p,k as _,c as o,l as d,b as t,h as n,F as x,m as h,n as f,j as y,o as a,e as k,t as i}from"./index-BvsGCd9b.js";import{u as b}from"./data-C_m0Mceb.js";import{_ as g}from"./TopBar.vue_vue_type_script_setup_true_lang-CtReUXIV.js";import{_ as v}from"./BottomNav.vue_vue_type_script_setup_true_lang-Bb1Ze8Sv.js";const V={class:"pb-32 min-h-dvh"},w={class:"max-w-md mx-auto px-4 pt-2"},C={key:0,class:"text-center py-12 text-ink-muted"},N=["onClick"],$={class:"min-w-0 flex-1"},B={class:"font-bold truncate"},D={class:"text-meta text-ink-muted"},F={key:0},S={key:1},j={key:2},L={key:3},G=p({__name:"VehiclesView",setup(E){const r=b(),m=y();_(()=>r.loadVehicles());const l=f(()=>r.vehicles??[]),u=c=>c.toLocaleString(void 0,{maximumFractionDigits:2});return(c,s)=>(a(),o("div",V,[d(g),t("main",w,[s[3]||(s[3]=t("h1",{class:"text-display py-4"},"Vehicles",-1)),l.value.length===0?(a(),o("div",C,[...s[0]||(s[0]=[t("div",{class:"text-5xl mb-3 opacity-60"},"🚗",-1),t("p",{class:"text-meta"},"No vehicles on file yet.",-1)])])):n("",!0),(a(!0),o(x,null,h(l.value,e=>(a(),o("article",{key:e.id,class:"rounded-card bg-surface shadow-card p-4 mb-3 flex items-center gap-3 active:scale-[0.99] transition cursor-pointer",onClick:M=>k(m).push(`/vehicles/${e.id}`)},[s[1]||(s[1]=t("div",{class:"w-11 h-11 rounded-pill bg-brand-100 text-brand-700 flex items-center justify-center text-xl shrink-0"},"🚗",-1)),t("div",$,[t("div",B,i(e.label),1),t("div",D,[e.plate?(a(),o("span",F,i(e.plate),1)):n("",!0),e.plate&&e.year?(a(),o("span",S," · ")):n("",!0),e.year?(a(),o("span",j,i(e.year),1)):n("",!0),e.odometer!=null?(a(),o("span",L," · "+i(u(e.odometer))+" km",1)):n("",!0)])]),s[2]||(s[2]=t("span",{class:"text-ink-subtle"},"›",-1))],8,N))),128))]),d(v)]))}});export{G as default};
//# sourceMappingURL=VehiclesView-oL8h3Swe.js.map
