use color_eyre::Result;
use crossterm::event::{KeyEvent, KeyCode};
use ratatui::{
layout::{Alignment, Constraint, Flex, Layout, Margin, Rect},
style::{palette::tailwind, Style, Modifier},
text::Text,
widgets::{
Block, BorderType, Cell, Clear, HighlightSpacing, Paragraph, Row,
Scrollbar, ScrollbarOrientation, ScrollbarState, Table, TableState,
},
Frame
};
use super::palette::StylePalette;
use super::Component;
use crate::{action::Action, app::Mode, config::Config};
#[derive(Debug, Clone)]
pub struct Help {
is_active: bool,
current_mode: Mode,
palette: StylePalette,
scroll_state: ScrollbarState,
table_state: TableState,
}
const ITEM_HEIGHT: usize = 3;
impl Help {
fn move_down(&mut self) -> Result