use crate::feature_pack::all_feature_packs;
use comfy_table::presets::UTF8_BORDERS_ONLY;
use comfy_table::{Cell, Color, ContentArrangement, Table};
pub fn feature_packs_cmd() {
let mut table = Table::new();
table
.load_preset(UTF8_BORDERS_ONLY)
.set_content_arrangement(ContentArrangement::Dynamic)
.set_header(vec!["Shortcut", "Version", "Group ID", "Artifact ID"]);
for fp in all_feature_packs() {
table.add_row(vec![
Cell::new(fp.shortcut).fg(Color::DarkMagenta),
Cell::new(fp.version).fg(Color::DarkCyan),
Cell::new(fp.group_id).fg(Color::AnsiValue(248)),
Cell::new(fp.artifact_id).fg(Color::AnsiValue(248)),
]);
}
println!("\n{table}");
}