pub mod backends;
pub mod certs;
pub mod clusters;
pub mod events;
pub mod h2;
pub mod listeners;
pub mod overview;
use ratatui::style::{Modifier, Style};
use ratatui::text::{Line, Span};
use ratatui::widgets::Cell;
use super::theme::Skin;
pub(super) fn sort_header(label: &str, active: bool, reverse: bool, skin: &Skin) -> Cell<'static> {
if active {
let arrow = if reverse { "▲" } else { "▼" };
Cell::from(Line::from(vec![Span::styled(
format!("{label} {arrow}"),
Style::default()
.fg(skin.accent)
.add_modifier(Modifier::BOLD),
)]))
} else {
Cell::from(Line::from(Span::styled(
label.to_owned(),
Style::default().fg(skin.secondary),
)))
}
}