use ansi_rgb::*;
use rgb::RGB8;
fn info_color(input: &str) -> WithForeground<&str> {
input.fg(cyan_blue())
}
#[allow(clippy::print_stdout)]
pub fn pclr(sms: &str, color: RGB8) {
print!("{}", sms.fg(color));
}
#[allow(clippy::print_stdout)]
pub fn pclrln(sms: &str, color: RGB8) {
println!("{}", sms.fg(color));
}
#[allow(clippy::print_stdout)]
pub fn status(state: &str, sms: &str) {
print!("[{}] {}", state.fg(yellow()), info_color(sms));
}
#[allow(clippy::print_stdout)]
pub fn info(sms: &str) {
print!("{}", info_color(sms));
}
#[allow(clippy::print_stdout)]
pub fn err(sms: &str) {
eprint!("[{}] {}", "ERROR".fg(red()), sms.fg(orange()));
}
#[cfg(debug_assertions)]
#[allow(clippy::print_stdout)]
pub fn debug(sms: &str) {
print!("{}", info_color(sms));
}
#[cfg(not(debug_assertions))]
pub fn debug(_sms: &str) {}
#[allow(clippy::print_stdout)]
pub fn status_ln(state: &str, sms: &str) {
println!("[{}] {}", state.fg(yellow()), info_color(sms));
}
#[allow(clippy::print_stdout)]
pub fn info_ln(sms: &str) {
println!("{}", info_color(sms));
}
#[allow(clippy::print_stdout)]
pub fn err_ln(sms: &str) {
eprintln!("[{}] {}", "ERROR".fg(red()), sms.fg(orange()));
}
#[cfg(debug_assertions)]
#[allow(clippy::print_stdout)]
pub fn debug_ln(sms: &str) {
println!("{}", info_color(sms));
}
#[cfg(not(debug_assertions))]
pub fn debug_ln(_sms: &str) {}