import{d as b,_ as f,g as h,e as u,f as m,s as S,r as k,o as i,c as l,b as e,a,w as o,h as n,i as r,p as I,j as y}from"./index-9a3ecfe5.js";const p=b({insights:{},orderedTrains:[],selectedTrain:{},selectedStation:{},rawData:{},displaySelectedTrain:!1,displayedSelectedStation:!1,loggedIn:!1,isWaitingForLoginStatus:!0,setInsights(t){this.insights=t},setRawData(t){this.rawData=t},setOrderedTrains(t){t.sort((c,_)=>c.time-_.time),this.orderedTrains=t},setSelectedTrain(t){this.selectedTrain=t},setSelectedStation(t){this.selectedStation=t},setDisplaySelectedTrain(t){this.displaySelectedTrain=t},setDisplaySelectedStation(t){this.displaySelectedStation=t},setLoginStatus(t){this.loggedIn=t}});const L={name:"Navbar",data(){return{isLoggedIn:!1}},created(){const t=h(u);m(t,c=>{c?this.isLoggedIn=!0:this.isLoggedIn=!1,p.setLoginStatus(this.isLoggedIn),p.isWaitingForLoginStatus=!1})},methods:{logout(){S(h(u)).then(()=>{this.$router.push("/")})}}},g=t=>(I("data-v-9f58d794"),t=t(),y(),t),x={style:{"z-index":"4"},class:"navbar navbar-expand-sm navbar-light bg-light"},T={class:"container-fluid"},w=g(()=>e("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",alt:"mascot",width:"55",height:"40",class:"d-inline-block align-text-middle"},null,-1)),C=g(()=>e("b",null,"Irish Rail Tracker",-1)),N=g(()=>e("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[e("span",{class:"navbar-toggler-icon"})],-1)),D={class:"collapse navbar-collapse",id:"navbarSupportedContent"},V={class:"navbar-nav me-auto mb-2 mb-lg-0"},A={class:"nav-item"},B={class:"nav-link"},F={class:"nav-item"},O={class:"nav-link"},R={class:"nav-item"},W={key:0,class:"nav-link"},j={key:1,class:"nav-link"},z={class:"nav-item"},E={key:0,id:"logout",class:"nav-link"},H={key:1,class:"nav-link"};function U(t,c,_,q,d,v){const s=k("router-link");return i(),l("nav",x,[e("div",T,[a(s,{tag:"a",style:{"text-decoration":"none",color:"black","font-weight":"100"},to:"/",class:"navbar-brand"},{default:o(()=>[w,C]),_:1}),N,e("div",D,[e("ul",V,[e("li",A,[e("a",B,[a(s,{to:"/"},{default:o(()=>[n("Home")]),_:1})])]),e("li",F,[e("a",O,[a(s,{to:"/insights"},{default:o(()=>[n("Insights")]),_:1})])]),e("li",R,[d.isLoggedIn?r("",!0):(i(),l("a",W,[a(s,{to:"/login"},{default:o(()=>[n("Login")]),_:1})])),d.isLoggedIn?(i(),l("a",j,[a(s,{to:"/account"},{default:o(()=>[n("Account Settings")]),_:1})])):r("",!0)]),e("li",z,[d.isLoggedIn?(i(),l("a",E,[a(s,{style:{"text-decoration":"none",color:"black","font-weight":"100"},onClick:v.logout,to:"/",class:"navlink"},{default:o(()=>[n("Logout")]),_:1},8,["onClick"])])):r("",!0),d.isLoggedIn?r("",!0):(i(),l("a",H,[a(s,{to:"/signup"},{default:o(()=>[n("Sign Up")]),_:1})]))])])])])])}const J=f(L,[["render",U],["__scopeId","data-v-9f58d794"]]);export{J as N,p as s};
