use ratatui::layout::Rect;
use ratatui::style::Style;
use ratatui::text::{Line, Span};
use ratatui::widgets::Paragraph;
use ratatui::Frame;
use crate::tui::glyphs;
use crate::tui::theme::Theme;
pub fn render(frame: &mut Frame, area: Rect, theme: &Theme, tick: u64, label: &str) {
if area.height == 0 {
return;
}
let colors = &theme.colors;
let line = Line::from(vec![
Span::styled(
glyphs::current().spinner_frame(tick),
Style::default().fg(colors.accent),
),
Span::styled(format!(" {label}"), Style::default().fg(colors.subtext)),
])
.centered();
frame.render_widget(Paragraph::new(line), area);
}