use crate::theme::Theme;
#[derive(Debug)]
pub struct AppState {
pub running: bool,
pub show_about: bool,
pub theme: Theme,
pub theme_picker_open: bool,
pub registry_open: bool,
pub builtin_items: Vec<(super::BuiltinId, String, String)>,
}
impl AppState {
pub fn new(theme: Theme) -> Self {
let builtin_items = super::all_builtins()
.into_iter()
.map(|(id, cat, label)| (id, cat.to_string(), label.to_string()))
.collect();
AppState {
running: true,
show_about: false,
theme,
theme_picker_open: false,
registry_open: false,
builtin_items,
}
}
}