use clap::{Parser, Subcommand};
use std::path::PathBuf;

#[derive(Parser)]
#[command(
    name = "labgenetics",
    version,
    about = "Genetic variant analysis — pathogenicity, pharmacogenomics, and polygenic risk"
)]
pub struct Cli {
    /// Input file (VCF, JSON, or text)
    pub input: Option<PathBuf>,

    /// Comma-separated gene names or rsIDs
    #[arg(long)]
    pub genes: Option<String>,

    /// Read from stdin
    #[arg(long)]
    pub stdin: bool,

    /// Force JSON output (default when piped)
    #[arg(long, global = true)]
    pub json: bool,

    /// Quiet mode — suppress warnings
    #[arg(long, global = true)]
    pub quiet: bool,

    /// Filter by category
    #[arg(long)]
    pub category: Option<String>,

    /// Show only actionable variants
    #[arg(long)]
    pub actionable_only: bool,

    /// Include pharmacogenomics interpretation
    #[arg(long)]
    pub pgx: bool,

    #[command(subcommand)]
    pub command: Option<Commands>,
}

#[derive(Subcommand)]
pub enum Commands {
    /// Show agent-info for AI consumption
    AgentInfo,
    /// List known variants in catalog
    Variants {
        /// Filter by gene
        #[arg(long)]
        gene: Option<String>,
        /// Filter by category
        #[arg(long)]
        category: Option<String>,
    },
}
