use anyhow::Result;
use clap::Subcommand;
use crate::Config;
mod config;
mod embeds;
mod languages;
mod man;
#[derive(Debug, Subcommand)]
pub enum ShowCommands {
#[command(bin_name = "iocaine show config")]
Config(config::ShowConfigArgs),
#[command(bin_name = "iocaine show embeds")]
Embeds(embeds::ShowEmbedArgs),
#[command(bin_name = "iocaine show languages")]
Languages(languages::ShowLanguagesArgs),
#[command(bin_name = "iocaine show manuals", hide = true)]
Manuals(man::ShowManualArgs),
}
pub fn run(config: Config, command: ShowCommands) -> Result<()> {
match command {
ShowCommands::Config(args) => config::run(config, &args),
ShowCommands::Embeds(args) => embeds::run(args),
ShowCommands::Languages(args) => languages::run(args),
ShowCommands::Manuals(args) => man::run(args),
}
}