use console::{style, StyledObject, Term};
pub fn header(msg: &str) -> StyledObject<&str> {
style(msg).magenta().bold()
}
pub fn element(msg: &str) -> StyledObject<&str> {
style(msg).yellow().bold()
}
pub fn field(msg: &str) -> StyledObject<&str> {
style(msg).cyan().bold()
}
pub fn tipe(msg: &str) -> StyledObject<&str> {
style(msg).cyan()
}
pub fn value(msg: &str) -> StyledObject<&str> {
style(msg).yellow()
}
pub fn fill(msg: &str, indent: &str) -> String {
let (_, width) = Term::stdout().size();
let options = textwrap::Options::new(width.into())
.initial_indent(indent)
.subsequent_indent(indent);
textwrap::fill(msg, options)
}