use cli_boxes::{BorderStyle, BoxChars};
fn main() {
println!("📦 CLI Boxes - Basic Example\n");
println!("Using predefined styles:");
draw_simple_box("Hello, World!", BoxChars::SINGLE);
draw_simple_box("Important Notice", BoxChars::DOUBLE);
draw_simple_box("Friendly Message", BoxChars::ROUND);
println!("Using BorderStyle enum:");
let style = BorderStyle::Bold;
draw_simple_box("Bold Statement", style.chars());
println!("Custom box with builder:");
let custom = BoxChars::builder()
.corners('*')
.horizontal('-')
.vertical('|')
.build();
draw_simple_box("Custom Style", custom);
println!("Parsing from string:");
if let Ok(parsed_style) = "round".parse::<BorderStyle>() {
draw_simple_box("Parsed Style", parsed_style.chars());
}
}
fn draw_simple_box(text: &str, chars: BoxChars) {
let width = text.len() + 2;
print!("{}", chars.top_left);
print!("{}", chars.top.to_string().repeat(width));
println!("{}", chars.top_right);
println!("{} {} {}", chars.left, text, chars.right);
print!("{}", chars.bottom_left);
print!("{}", chars.bottom.to_string().repeat(width));
println!("{}", chars.bottom_right);
println!(); }