use keyper::{App, Result};

fn main() -> Result<()> {
    let mut app = App::new();
    let mut terminal = ratatui::init();

    app.run(&mut terminal)
        .inspect_err(|err| {
            app.show_error(&mut terminal, "Error running application", err.to_string())
                .ok();
        })
        .ok();

    ratatui::restore();

    Ok(())
}
