use crossterm::style::{Color, Stylize};
use modcli::output::{hook, messages, themes};
fn main() {
let _guard = themes::ThemeGuard::apply("blue");
let header = "Commands (custom header)"
.with(Color::Cyan)
.bold()
.to_string();
messages::set_message("help.header", header);
messages::set_output_interceptor(|category, text| {
if category == "status" {
std::borrow::Cow::Owned(text.with(Color::Green).dim().to_string())
} else {
std::borrow::Cow::Owned(text.to_string())
}
});
hook::status("System warming up...");
hook::success("Ready!");
let header = messages::message_or_default("help.header", "Commands");
println!("\n{header}");
println!(" foo Do foo things");
println!(" bar Do bar things");
}