1
//! Per-tab state holders. Kept intentionally thin right now — the TUI
2
//! scaffolding ships with placeholder views for each tab and the
3
//! individual tab implementations grow in follow-up work as the server
4
//! commands needed by each view get promoted out of the web crate.
5

            
6
use crate::app::Tab;
7

            
8
/// Short, one-line human description of what a tab will eventually do.
9
/// Rendered as placeholder body text until per-tab views land.
10
#[must_use]
11
21
pub fn placeholder_body(tab: Tab) -> &'static str {
12
21
    match tab {
13
2
        Tab::Accounts => "Accounts — list, create, view hierarchy.",
14
1
        Tab::Transactions => "Transactions — list, create multi-split entries.",
15
1
        Tab::Commodities => "Commodities — list, create.",
16
16
        Tab::Reports => "Reports — balance / activity / breakdown, with chart pane.",
17
1
        Tab::Config => "Config — view and edit TUI / server configuration.",
18
    }
19
21
}
20

            
21
#[cfg(test)]
22
mod tests {
23
    use super::*;
24

            
25
    #[test]
26
1
    fn every_tab_has_placeholder_text() {
27
5
        for tab in Tab::ALL {
28
5
            let body = placeholder_body(tab);
29
5
            assert!(!body.is_empty());
30
        }
31
1
    }
32
}