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