import{r as registerInstance,h,H as Host}from"./index-b7735e0d.js";import{d as dark}from"./dark-debf9c41.js";import{l as light}from"./light-e0bd183b.js";import{i as isUserLoggedIn}from"./index-c7307038.js";import"./colors-4dc9e03b.js";import"./kimlikApi-0d7e6ce7.js";import"./apiBase-d573f009.js";import"./data-transfer-field-918730a3.js";import"./BaseField-461b6d0c.js";import"./filter-cbaa3d7d.js";import"./cookie-1686830b.js";import"./_commonjsHelpers-27f122dd.js";function wrapContent(t,e){return h(Host,null,h("mentornity-console-app-context-injector",{theme:t},h("dvn-theme-provider",{colorBackground:true,fitHeight:true,theme:t},h("dvn-global-table",null),h("dvn-global-grid",null),h("dvn-global-text",null),h("notifier-wrapper",null,e))))}var MentornityConsoleAppRoot=function(){function t(t){var e=this;registerInstance(this,t);this.navigate=function(t){e.path=t.path;history.pushState({},"",e.path)}}t.prototype.onThemeChange=function(t){if(t.detail==="dvn-dark"){this.theme=dark}else{this.theme=light}};t.prototype.componentWillLoad=function(){var t=(new Date).getHours();var e=6>t||t>18;this.theme=e?dark:light;this.path=location.pathname};t.prototype.render=function(){if(!isUserLoggedIn()){return wrapContent(this.theme,h("dvn-app-anonymous",{navigate:this.navigate,path:this.path}))}return wrapContent(this.theme,h("dvn-app",{navigate:this.navigate,path:this.path}))};return t}();export{MentornityConsoleAppRoot as mentornity_console_app_root};