pub mod config_tab;
pub mod help;
pub mod log_tab;
pub mod paths_tab;
pub mod plugins_tab;
pub mod popup;
pub mod status_bar;
pub mod tab_bar;
pub mod ui_utils;

use crossterm::event::KeyEvent;
use ratatui::layout::Rect;
use ratatui::Frame;

use crate::action::Action;

/// Trait for all UI components
pub trait Component {
    /// Handle a key press
    fn handle_key(&mut self, _key: KeyEvent) -> Action {
        Action::Noop
    }

    /// Render this component
    fn render(&mut self, frame: &mut Frame, area: Rect);
}
