import{d as e,c as a,s,v as t,r as i,o as n,b as c,e as l,A as r,F as o,f as u,k as p,t as d}from"./index.963d0b2f.js";var m=e({name:"SiteSelector",setup(){const e=a((()=>s.state.curView.type)),i=a((()=>[...s.state.viewOptions,...s.state.communityOptions])),n=t();return{curViewType:e,options:i,handleChange:e=>{s.commit("SET_CURRENT_VIEW",i.value.find((a=>e===a.type))),s.state.curView.id&&s.dispatch("initStationData",s.state.curView.id),isNaN(+e)&&"lfs"!=e?n.push({name:"main"}):isNaN(+e)&&"lfs"==e?n.push({name:"raffles"}):n.push({name:"community",query:{id:e}})}}}});m.render=function(e,a,s,t,m,w){const y=i("a-select-option"),f=i("a-select");return n(),c("div",{id:"site-selector",class:"site-selector",style:"left:"+(isNaN(+e.curViewType)&&"lfs"!=e.curViewType?"calc(20vw + .1rem)":isNaN(+e.curViewType)&&"lfs"==e.curViewType?"calc(32vw + .1rem)":"calc(16vw + .1rem)")},[l(f,{value:e.curViewType,"dropdown-class-name":"site-selector-drop-down",onSelect:e.handleChange},{default:r((()=>[(n(!0),c(o,null,u(e.options,(e=>(n(),c(y,{key:e.type,value:e.type},{default:r((()=>[p(d(e.name),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value","onSelect"])],4)};export{m as _};
