use keyper::{App, Result};

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

    if let Err(err) = app.run(&mut terminal).await {
        app.show_error(&mut terminal, "Error running application", err.to_string())
            .await
            .ok();
    }

    ratatui::restore();

    Ok(())
}
