import{o as i,a as l,e as a,b as n,w as o,s as c,l as M,g as d,t as h,F as k,A as S,f as x,p as T,i as F,_ as V,I as p,$ as N,q as _,Z as f,at as L,m as u,W as P,a0 as y,L as U,ao as A,T as B,j as E,J as D,U as O,V as W}from"./entry.b9f489e4.js";import{m as w}from"./my-local-prefs-service.3c3b3d2c.js";import{_ as j}from"./Stack.795548d7.js";import{_ as q}from"./avatarletter.4e0bd7de.js";import{_ as z}from"./scroll-panel.32857e1e.js";const I=e=>(T("data-v-e21852ec"),e=e(),F(),e),J={class:"nav"},R=["src"],Z={key:0,class:"links"},G={key:0,class:"indicator"},H=["src"],K=["src"],Q={key:0,class:"indicator"},X=I(()=>a("i",{class:"fa fa-bell"},null,-1)),Y=I(()=>a("i",{class:"fa fa-calendar-alt"},null,-1)),$=[Y],ee={key:0,class:"indicator"},te=["src"],se=["src"];function ae(e,r,ie,oe,g,s){const m=j,v=V,b=q,C=z;return i(),l("div",J,[a("div",{class:"side-nav",style:c({...e.theme.primary,...s.colorVars})},[n(C,null,{header:o(()=>[n(m,{class:"v center stretch dashboard-header",style:c({...e.theme.primary})},{default:o(()=>[n(m,{class:"v center"},{default:o(()=>[a("a",{class:"logo",onClick:r[0]||(r[0]=M((...t)=>s.homeClicked&&s.homeClicked(...t),["prevent"]))},[s.logoImageUrl?(i(),l("img",{key:0,src:s.logoImageUrl},null,8,R)):d("",!0)]),a("h3",null,h(e.org.name),1)]),_:1})]),_:1},8,["style"])]),footer:o(()=>[a("div",{class:"footer",style:c({...e.theme.primary})},[n(m,{class:"h stretch center"},{default:o(()=>[a("div",{class:"item",onClick:r[1]||(r[1]=(...t)=>s.openNotificationModal&&s.openNotificationModal(...t))},[s.checkStamp?(i(),l("div",Q)):d("",!0),X]),a("div",{class:"item",onClick:r[2]||(r[2]=(...t)=>s.openMyCalendarModal&&s.openMyCalendarModal(...t))},$),n(b,{class:"item",user:e.user,multiplier:1,"border-thickness":1,onClick:s.openProfile},null,8,["user","onClick"])]),_:1})],4)]),default:o(()=>[s.canShowNavigation?(i(),l("div",Z,[(i(!0),l(k,null,S(s.featuresToShowInDesktopNav,t=>(i(),l("div",{class:"link",key:t.id},[e.featureTimestamps[t.id]>g.featureViewStamps[t.id]?(i(),l("div",G)):d("",!0),n(v,{to:s.getFeatureLink(t.id),onClick:s.closeIfInMobile},{default:o(()=>[n(m,{class:"h center wrapper"},{default:o(()=>[a("img",{class:"img default",src:t.icon.default_ios_url,style:c(t.icon.is_colored?{}:s.textPrimaryIconStyle)},null,12,H),a("img",{class:"img selected",src:t.icon.selected_ios_url,style:c(t.icon.is_colored?{}:s.textPrimaryIconStyle)},null,12,K),a("p",null,h(t.name),1)]),_:2},1024)]),_:2},1032,["to","onClick"])]))),128))])):d("",!0)]),_:1})],4),a("div",{class:"bottom-nav",style:c({...e.theme.primary,...s.colorVars})},[s.canShowNavigation?(i(),x(m,{key:0,class:"center links"},{default:o(()=>[(i(!0),l(k,null,S(s.featuresToShowInMobileNav,t=>(i(),l("div",{class:"link",key:t.id},[e.featureTimestamps[t.id]>g.featureViewStamps[t.id]?(i(),l("div",ee)):d("",!0),n(v,{to:s.getFeatureLink(t.id)},{default:o(()=>[n(m,{class:"v center wrapper"},{default:o(()=>[a("img",{class:"img default",src:t.icon.default_ios_url,style:c(t.icon.is_colored?{}:s.textPrimaryIconStyle)},null,12,te),a("img",{class:"img selected",src:t.icon.selected_ios_url,style:c(t.icon.is_colored?{}:s.textPrimaryIconStyle)},null,12,se),a("p",null,h(t.name),1)]),_:2},1024)]),_:2},1032,["to"])]))),128))]),_:1})):d("",!0)],4)])}const re={props:{},emits:["close"],data(){return{featureViewStamps:{},selected:!1}},computed:{...p(D,["org","featureTimestamps"]),...p(O,["user","isLocalAuthenticated","authenticated"]),...p(W,{theme:"styles",themeColors:"colors"}),canShowNavigation(){const e=N.getExhibitor(this.org);return!this.isWebinar||e!=null&&!e.venue_hidden},checkStamp(){var e,r;return(((e=this.featureTimestamps)==null?void 0:e.notifications)||0)>(((r=this.featureViewStamps)==null?void 0:r.notifications)||0)},featuresToShowInMobileNav(){return this.org.nav_features},featuresToShowInDesktopNav(){const e=_.find(this.org.nav_features,{id:"more"});return e!=null?[..._.take(this.org.nav_features,4),...e.sub_features]:this.org.nav_features},logoImageUrl(){return this.org.store_config.icon_url},secondaryIconStyle(){return f.generateFilter(this.themeColors.secondary)},textPrimaryIconStyle(){return f.generateFilter(this.themeColors.text_primary)},isWebinar(){return this.org.nunify_event_type===1},colorVars(){return{"--primary-text-color-shadow":f.setAlpha(this.themeColors.text_primary,.1),"--primary-text-color":this.themeColors.text_primary,"--primary-color":this.themeColors.primary}}},watch:{$route(){this.hideEventMenu()}},async mounted(){if(this.featureViewStamps=w.fetchFeatureViewTimestamps(),_.keys(this.featureTimestamps).length===0){const e=await L.getFeatureItemStamps(u().$creds,this.org);if(e.ok&&(u().$orgStore.setFeatureTimestamps(e.data),_.keys(this.featureViewStamps).length===0)){const r=_.cloneDeep(e.data);this.featureViewStamps=w.setAllFeatureViewTimestamp(r)}}u().$bus.$on("feature-view",this.updateFeatureTimestamps)},beforeUnmount(){u().$bus.$off("feature-view",this.updateFeatureTimestamps)},methods:{closeIfInMobile(){window.matchMedia("only screen and (max-width: 600px)").matches&&this.$emit("close")},openNotificationModal(){u().$bus.$emit("open-notifications")},openMyCalendarModal(){u().$bus.$emit("open-my-calendar")},getFeatureLink(e){return P.relativeBaseUrl(this.org,{id:e})},updateFeatureTimestamps(e){this.featureViewStamps=e},homeClicked(){y(U.orgRelativeUrl(this.org,""))},hideEventMenu(){this.showEventMenu=!1},openProfile(){y(this.getFeatureLink("my-profile"))},async signOut(){await A.signOut(this.$creds),this.$userStore.logout(this.$creds),B.reset(this.$userStore),u().$flashNotificationsStore.notify({message:"logged out successfully",type:"success"}),y("/")}}},de=E(re,[["render",ae],["__scopeId","data-v-e21852ec"]]);export{de as default};
