import f from"./DataGauge-6847a0de.js";import{d as g,r as u,w as m,i as v,_ as k,f as y,a as c,c as s,F as S,l as C,b as a,x as q,q as w,u as G}from"./index-b1308428.js";function d(e){return e*.6213712}function T(e){return e*(9/5)+32}function p(e){return e/3.79}function h(e){return e/28.35}const b="/assets/car_issue-bff3f380.svg",B=g({components:{DataGauge:f},setup(){const e=u(v("vehicleStore")),l=u(v("settingsStore")),i={kilometer_per_hour:{unit:"miles_per_hour",converter:d},kilometer:{unit:"mile",converter:d},degree_celsius:{unit:"degree_fahrenheit",converter:T},liter_per_hour:{unit:"gallon_per_hour",converter:p},liter:{unit:"gallon",converter:p},gram_per_second:{unit:"ounce_per_second",converter:h},gram:{unit:"ounce",converter:h}},_=t=>Object.keys(i).includes(t.toLowerCase())&&!l.value.metricUnits?i[t.toLowerCase()]:{unit:t},r=u(e.value.stats);return m(e,()=>{e.value.stats.forEach((t,n)=>{const o=_(t.value.unit);o.converter?(r.value[n].value.quantity=o.converter(t.value.quantity),r.value[n].value.unit=o.unit):r.value[n].value.quantity=t.value.quantity})},{deep:!0}),{vehicleStore:e,stats:r,noCarIcon:b}}});const I=e=>(w("data-v-1a8068ae"),e=e(),G(),e),L={key:0,class:"vehicle-info"},$={key:1,id:"not-connected"},D={id:"not-connected-container"},F={id:"not-connected-icon-container"},V=["src"],j=I(()=>a("p",null,"Not connected to vehicle!",-1));function E(e,l,i,_,r,t){const n=y("DataGauge");return c(),s("div",null,[e.vehicleStore.connected?(c(),s("div",L,[(c(!0),s(S,null,C(e.stats,o=>(c(),q(n,{class:"gauge",key:o.name,stats:o},null,8,["stats"]))),128))])):(c(),s("div",$,[a("div",D,[a("div",F,[a("img",{class:"not-connected-icon",src:e.noCarIcon},null,8,V)]),j])]))])}const M=k(B,[["render",E],["__scopeId","data-v-1a8068ae"]]);export{M as default};
