Skip to main content

kimun_notes/components/
panel.rs

1//! The `Panel` seam — the persistent editor-screen surfaces (sidebar, editor,
2//! Query panel) behind one interface, the persistent-surface counterpart to
3//! the `Overlay` trait. See CONTEXT.md ("TUI surfaces").
4
5/// Identifies a persistent panel. Closed set, mirrors `OverlayKind`.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
7pub enum PanelKind {
8    Sidebar,
9    Editor,
10    Query,
11}
12
13impl PanelKind {
14    /// Footer label shown when this panel is focused.
15    pub fn label(&self) -> &'static str {
16        match self {
17            PanelKind::Sidebar => "SIDEBAR",
18            PanelKind::Editor => "EDITOR",
19            PanelKind::Query => "BACKLINKS",
20        }
21    }
22}