import{P as _,Q as i,av as w,U as v,a2 as s,V as r,$ as l,Y as y,X as u,a1 as V,a0 as h,aw as S,a3 as p,W as N,ac as T,a4 as g}from"./index.f6fd9ad3.js";const C=_({name:"SiteSelector",setup(){const e=i(()=>s.state.curView.type),n=i(()=>[...s.state.viewOptions,...s.state.communityOptions]),t=w();return{curViewType:e,options:n,handleChange:a=>{s.commit("SET_CURRENT_VIEW",n.value.find(c=>a===c.type)),s.state.curView.id&&s.dispatch("initStationData",s.state.curView.id),console.log(a),isNaN(+a)&&a!="lfs"?t.push({name:"main"}):isNaN(+a)&&a=="lfs"?t.push({name:"raffles"}):t.push({name:"community",query:{id:a}})}}}});function $(e,n,t,m,a,c){const d=p("a-select-option"),f=p("a-select");return r(),l("div",{id:"site-selector",class:"site-selector",style:S(`left:${isNaN(+e.curViewType)&&e.curViewType!="lfs"?"calc(20vw + .1rem)":isNaN(+e.curViewType)&&e.curViewType=="lfs"?"calc(32vw + .1rem)":"calc(16vw + .1rem)"}`)},[y(f,{value:e.curViewType,"dropdown-class-name":"site-selector-drop-down",onSelect:e.handleChange},{default:u(()=>[(r(!0),l(V,null,h(e.options,o=>(r(),N(d,{key:o.type,value:o.type},{default:u(()=>[T(g(o.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onSelect"])],4)}var E=v(C,[["render",$]]);export{E as S};
