use ratatui::style::{Color, Modifier, Style};
pub const BLOCK_NUMBER_STYLE: Style = Style::new().fg(Color::Cyan);
pub const BLOCK_HASH_STYLE: Style = Style::new().fg(Color::DarkGray);
pub const BLOCK_TX_COUNT_STYLE: Style = Style::new().fg(Color::Yellow);
pub const BLOCK_AGE_STYLE: Style = Style::new().fg(Color::Green);
pub const TX_HASH_STYLE: Style = Style::new().fg(Color::Cyan);
pub const TX_TYPE_INVOKE: Style = Style::new().fg(Color::Green);
pub const TX_TYPE_DECLARE: Style = Style::new().fg(Color::Blue);
pub const TX_TYPE_DEPLOY: Style = Style::new().fg(Color::Magenta);
pub const TX_TYPE_L1HANDLER: Style = Style::new().fg(Color::Yellow);
pub const TX_FEE_STYLE: Style = Style::new().fg(Color::DarkGray);
pub const META_TX_STYLE: Style = Style::new()
.fg(Color::LightMagenta)
.add_modifier(Modifier::BOLD);
pub const PRIVACY_STYLE: Style = Style::new()
.fg(Color::Indexed(208))
.add_modifier(Modifier::BOLD);
pub const STATUS_OK: Style = Style::new().fg(Color::Green);
pub const STATUS_REVERTED: Style = Style::new().fg(Color::Red);
pub const STATUS_LOADING: Style = Style::new().fg(Color::Yellow);
pub const STATUS_ERROR: Style = Style::new().fg(Color::Red);
pub fn finality_style(status: &str) -> Style {
match status {
"ACCEPTED_ON_L1" => STATUS_OK,
"ACCEPTED_ON_L2" | "PRE_CONFIRMED" | "PENDING" => STATUS_LOADING,
_ => Style::new().fg(Color::DarkGray),
}
}
pub const SELECTED_STYLE: Style = Style::new()
.bg(Color::DarkGray)
.add_modifier(Modifier::BOLD);
pub const NORMAL_STYLE: Style = Style::new();
pub const VISUAL_SELECTED_STYLE: Style = Style::new()
.fg(Color::Black)
.bg(Color::LightCyan)
.add_modifier(Modifier::BOLD);
pub const LABEL_STYLE: Style = Style::new()
.fg(Color::LightYellow)
.add_modifier(Modifier::BOLD);
pub const SEARCH_PROMPT_STYLE: Style = Style::new().fg(Color::Cyan);
pub const SEARCH_INPUT_STYLE: Style = Style::new().fg(Color::White);
pub const SUGGESTION_STYLE: Style = Style::new().fg(Color::DarkGray);
pub const SUGGESTION_SELECTED_STYLE: Style = Style::new().fg(Color::White).bg(Color::DarkGray);
pub const TITLE_STYLE: Style = Style::new().fg(Color::Cyan).add_modifier(Modifier::BOLD);
pub const BORDER_STYLE: Style = Style::new().fg(Color::DarkGray);
pub const BORDER_FOCUSED_STYLE: Style = Style::new().fg(Color::Cyan);
pub const ADDRESS_PALETTE: [Style; 8] = [
Style::new().fg(Color::LightCyan),
Style::new().fg(Color::LightMagenta),
Style::new().fg(Color::LightGreen),
Style::new().fg(Color::LightYellow),
Style::new().fg(Color::LightBlue),
Style::new().fg(Color::LightRed),
Style::new().fg(Color::Magenta),
Style::new().fg(Color::Blue),
];
pub const TX_SENDER_STYLE: Style = Style::new().fg(Color::White).add_modifier(Modifier::BOLD);