import { LitElement, html, css } from "lit";
import { store} from "../store/index.js";
import { StoreController } from "../controllers/store.js";
import "./nav-bar.js";
import "./page-home.js";
import "./page-items.js";
class AppRoot extends LitElement {
#user = new StoreController(this, store, s => s.user);
#route = new StoreController(this, store, s => s.route);
static styles = css`
:host {
display: block;
min-height: 100vh;
}
`;
render() {
return html`
${this.#renderRoute()}
`;
}
#renderRoute() {
switch (this.#route.value) {
case "home": return html``;
case "items": return html``;
default: return html``;
}
}
}
customElements.define('app-root', AppRoot);