use indicatif::MultiProgress;
use pandora_lib_variants::variants;

#[derive(Debug, Clone)]
pub struct VariantsConfig {
    pub result_dir: String,
}

impl Default for VariantsConfig {
    fn default() -> Self {
        Self {
            result_dir: "/data/longreads_basic_pipe".to_string(),
        }
    }
}

#[derive(Debug)]
pub struct RunVariantsAgg {
    pub id: String,
    pub config: VariantsConfig,
}

impl RunVariantsAgg {
    pub fn new(id: String, config: VariantsConfig) -> Self {
        Self { id, config }
    }
    pub fn run(&self) -> anyhow::Result<()> {
        let multi = MultiProgress::default();
        // multi.suspend(|| {
        variants::run_pipe(&self.id, true, &multi)
        // });
    }
}
