use tija_tools::terminal::{ProgressRing, AnimationMode};
use tokio::time::Duration;

async fn my_task() {
    tokio::time::sleep(Duration::from_secs(10)).await;
}

#[tokio::main]
async fn main() {

    let args: Vec<String> = std::env::args().collect();

    if args.contains(&"test".to_string())
    {
        let mut ring = ProgressRing::new(100, 10, Some(vec!["1","2","3","4","3","2"]), Some('s'));

        ProgressRing::run_with_animation(&mut ring, AnimationMode::Rotate, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Bounce, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Bounce2, my_task()).await;
        ProgressRing::run_with_animation(&mut ring, AnimationMode::Loading, my_task()).await;
    }
}
