use ratatui::{
layout::Alignment,
style::Style,
text::{Line, Span},
widgets::Paragraph,
Frame,
};
const BANNER: &str = r"
██╗ ██╗ ██████╗██████╗ █████╗ ██████╗██╗ ██╗███████╗██████╗
████████╗██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██████╔╝███████║██║ █████╔╝ █████╗ ██████╔╝
████████╗██║ ██╔══██╗██╔══██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗
╚██╔═██╔╝╚██████╗██║ ██║██║ ██║╚██████╗██║ ██╗███████╗██║ ██║
╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
";
pub fn render_banner(frame: &mut Frame, area: ratatui::layout::Rect, style: Style) {
let lines: Vec<Line> = BANNER.lines()
.filter(|l| !l.trim().is_empty())
.map(|l| Line::from(Span::styled(l.to_string(), style)))
.collect();
frame.render_widget(Paragraph::new(lines).alignment(Alignment::Center), area);
}
pub fn banner_lines() -> usize {
BANNER.lines().filter(|l| !l.trim().is_empty()).count()
}