use ratatui::widgets::{Paragraph, Widget, Wrap};

pub(crate) struct HelpWidget;
impl HelpWidget {
    pub(crate) fn new() -> Self {
        Self
    }
}

impl Widget for HelpWidget {
    fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
    where
        Self: Sized,
    {
        let text = Paragraph::new("Usage => q/Esc: Quit | j/↑ :Select UP | k/↓: Select Down | Enter: Launch Score\nPageUp/PageDown: Scroll Logs | Shift+G/End: Logs bottom")
            .centered()
            .wrap(Wrap { trim: false });

        Widget::render(text, area, buf)
    }
}
