import { gettext } from "django";
import { html, LitElement, property, TemplateResult } from "lit-element";
import { SidebarItem } from "../elements/sidebar/Sidebar";
import "../elements/router/RouterOutlet";
import "../elements/messages/MessageContainer";
import "../elements/sidebar/SidebarHamburger";
import "../elements/notifications/NotificationDrawer";
export abstract class Interface extends LitElement {
@property({type: Boolean})
sidebarOpen = true;
@property({type: Boolean})
notificationOpen = false;
abstract get sidebar(): SidebarItem[];
createRenderRoot(): ShadowRoot | Element {
return this;
}
constructor() {
super();
this.sidebarOpen = window.innerWidth >= 1280;
window.addEventListener("resize", () => {
this.sidebarOpen = window.innerWidth >= 1280;
});
window.addEventListener("ak-sidebar-toggle", () => {
this.sidebarOpen = !this.sidebarOpen;
});
window.addEventListener("ak-notification-toggle", () => {
this.notificationOpen = !this.notificationOpen;
});
}
render(): TemplateResult {
return html`