import{r as registerInstance,h,H as Host}from"./index-ecdfb761.js";import{d as dark}from"./dark-51789ed8.js";import{l as light}from"./light-e0bd183b.js";import{i as isUserLoggedIn}from"./index-7d83a942.js";import{w as watchDeviceAppearance}from"./theme-a6597800.js";import"./colors-4dc9e03b.js";import"./kimlik-api-66e341bd.js";import"./apiBase-648a161d.js";import"./data-transfer-field-2f305919.js";import"./BaseField-0b01dc2c.js";import"./filter-cbaa3d7d.js";import"./cookie-9f22e0fb.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.theme=light;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=this;if(watchDeviceAppearance((function(e){return t.theme=e==="dark"?dark:light}))==="dark"){this.theme=dark}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};