use crate::frames::{AnimatedFrames, A_FRAMES, BASE_FRAMES, B_FRAMES, X2_FRAMES};
use clap::{Parser, Subcommand, ValueEnum};
#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
pub enum Motion {
#[value(name = "teabag", alias = "1")]
Base,
#[value(name = "x2", alias = "2")]
X2,
#[value(name = "a", alias = "3")]
A,
#[value(name = "b", alias = "4")]
B,
}
impl Motion {
pub const ALL: [Motion; 4] = [Motion::Base, Motion::X2, Motion::A, Motion::B];
pub fn frames(self) -> &'static AnimatedFrames {
match self {
Motion::Base => &BASE_FRAMES,
Motion::X2 => &X2_FRAMES,
Motion::A => &A_FRAMES,
Motion::B => &B_FRAMES,
}
}
pub fn label(self) -> &'static str {
match self {
Motion::Base => "teabag",
Motion::X2 => "teabag x2",
Motion::A => "motion a",
Motion::B => "hands up",
}
}
}
#[derive(Parser)]
#[command(name = "arisusay")]
#[command(version)]
#[command(
about = "Like momoisay, but it's Tendou Aris from Blue Archive — and she teabags. \
Homage to the 청세치/세치혀 animation."
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
Say {
text: String,
},
Animate {
#[arg(value_enum, default_value = "teabag")]
variant: Motion,
#[arg(short, long)]
text: Option<String>,
},
Freestyle {
#[arg(short, long)]
text: Option<String>,
},
}