use std::path::PathBuf;

use clap::Subcommand;

#[derive(Subcommand)]
pub enum Commands {
    // TODO: Use wasm to do this instead
    // /// Moves money between accounts and departments, using the given rules and lines
    // MoveMoney {
    //     #[arg(short = 'r', long, value_name = "FILE")]
    //     rules: PathBuf,
    //
    //     #[arg(short = 'l', long, value_name = "FILE")]
    //     lines: PathBuf,
    //
    //     #[arg(short = 'a', long, value_name = "FILE")]
    //     accounts: PathBuf,
    //
    //     #[arg(short = 'c', long, value_name = "FILE")]
    //     cost_centres: PathBuf,
    //
    //     #[arg(short, long, value_name = "FILE")]
    //     output: Option<PathBuf>,
    //
    //     #[arg(short, long)]
    //     use_numeric_accounts: bool,
    //
    //     #[arg(short, long)]
    //     flush_pass: bool,
    // },
    /// Allocates servicing department amounts to operating departments
    AllocateOverheads {
        #[arg(short, long, value_name = "FILE")]
        lines: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        accounts: PathBuf,

        #[arg(short = 's', long, value_name = "FILE")]
        allocation_statistics: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        areas: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        cost_centres: PathBuf,

        #[arg(short, long)]
        use_numeric_accounts: bool,

        #[arg(long, default_value = "E")]
        account_type: String,

        #[arg(short, long)]
        exclude_negative_allocation_statistics: bool,

        #[arg(short = 'f', long)]
        show_from: bool,

        #[arg(short, long, default_value = "0.00000000000000001")]
        zero_threshold: f64,

        #[arg(short, long, value_name = "FILE", default_value = "alloc_output.csv")]
        output: PathBuf,

        #[arg(short, long)]
        msgpack_serialisation: bool,
    },
    CreateProducts {
        #[arg(short, long, value_name = "FILE")]
        definitions: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        encounters: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        services: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        transfers: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        procedures: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        diagnoses: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        patients: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        revenues: PathBuf,

        #[arg(short, long, value_name = "FILE")]
        output: PathBuf,
    },
    RunGraph {
        #[arg(short, long, value_name = "FILE")]
        graph: PathBuf,

        #[arg(short, long, default_value_t = num_cpus::get())]
        threads: usize,
    },
    GenerateSchema {
        #[arg(short, long, value_name = "FILE", default_value = "schema.json")]
        output: PathBuf,
    },
}
