use cargo_setupx::Config;
use std::io::{self, Write};
pub fn confirm_setup(config: &Config) -> anyhow::Result<bool> {
println!("📦 The following packs will be applied:");
if config.quality {
println!(" ✅ Quality Pack (rustfmt.toml, clippy.toml, _typos.toml, Makefile)");
}
if config.hooks {
println!(" ✅ Hooks Pack (.githooks/pre-push, setup.sh)");
}
if let Some(arch) = &config.arch {
println!(" ✅ Architecture Pack ({})", arch);
}
println!();
if config.force {
println!("⚠️ WARNING: --force flag set. Existing files will be overwritten!");
println!();
}
print!("Continue? [Y/n]: ");
io::stdout().flush()?;
let mut input = String::new();
io::stdin().read_line(&mut input)?;
let input = input.trim().to_lowercase();
Ok(input.is_empty() || input == "y" || input == "yes")
}