use crate::cli::command::profile::list::ProfileListArgs;
use crate::cli::command::profile::reset::ProfileResetArgs;
use crate::cli::command::profile::tutorial::ProfileTutorialArgs;
use arbitrary::Arbitrary;
use facet::Facet;
use figue::{self as args};
#[derive(Facet, Arbitrary, PartialEq, Debug)]
pub struct ProfileArgs {
#[facet(args::subcommand)]
pub command: ProfileCommand,
}
#[derive(Facet, Arbitrary, PartialEq, Debug)]
#[repr(u8)]
#[facet(rename_all = "kebab-case")]
pub enum ProfileCommand {
List(ProfileListArgs),
Reset(ProfileResetArgs),
Tutorial(ProfileTutorialArgs),
}
impl ProfileArgs {
pub fn invoke(self) -> eyre::Result<()> {
match self.command {
ProfileCommand::List(args) => args.invoke(),
ProfileCommand::Reset(args) => args.invoke(),
ProfileCommand::Tutorial(args) => args.invoke(),
}
}
}