/* Left rail navigation. Emits `navigate` events for view switching. */ import { LitElement, html, css } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import type { View } from './nv-app'; @customElement('nv-rail') export class NvRail extends LitElement { @property() view: View = 'scene'; static styles = css` :host { display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 4px; background: var(--bg-1); border-right: 1px solid var(--line); } .logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, oklch(0.78 0.14 70) 0%, oklch(0.55 0.16 30) 100%); display: grid; place-items: center; color: #1a0f00; font-weight: 700; font-family: var(--mono); font-size: 11px; margin-bottom: 14px; box-shadow: 0 4px 12px -2px oklch(0.55 0.16 30 / 0.35); } .btn { width: 36px; height: 36px; border-radius: 8px; background: transparent; border: 1px solid transparent; color: var(--ink-3); display: grid; place-items: center; transition: all 0.15s; position: relative; cursor: pointer; } .btn:hover { color: var(--ink); background: var(--bg-2); } .btn.active { color: var(--ink); background: var(--bg-3); border-color: var(--line-2); } .btn.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; background: var(--accent); border-radius: 2px; } .btn.ghost.active::before { background: var(--accent-3); } .spacer { flex: 1; } svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; } `; private navigate(v: View): void { this.dispatchEvent(new CustomEvent('navigate', { detail: v })); } override render() { return html`
`; } }