modcli/output/
print.rs

1use crossterm::style::Stylize;
2use std::{thread, time::Duration};
3
4/// Prints multi-line text with optional delay
5pub fn print_multiline(lines: &[&str], delay_ms: Option<u64>) {
6    for line in lines {
7        println!("{}", line);
8        if let Some(ms) = delay_ms {
9            thread::sleep(Duration::from_millis(ms));
10        }
11    }
12}
13
14/// Prints a success message
15pub fn print_success(msg: &str) {
16    println!("{}", msg.green().bold());
17}
18
19/// Prints a warning message
20pub fn print_warning(msg: &str) {
21    println!("{}", msg.yellow().bold());
22}
23
24/// Prints an error message
25pub fn print_error(msg: &str) {
26    println!("{}", msg.red().bold());
27}
28
29/// Prints a status/info message
30pub fn print_status(msg: &str) {
31    println!("{}", msg.cyan());
32}