use clap::{Parser, ValueEnum};

#[derive(Debug, Parser)]
#[command(version, about = "Index Folgezettel identifiers from note files")]
pub struct Cli {
    #[arg(value_name = "ID")]
    pub id: Option<String>,
    #[arg(value_name = "RELATIONSHIP")]
    pub relationship: Option<Relationship>,
    #[arg(short = 't', long)]
    pub tree: bool,
    #[arg(short = 'v', long)]
    pub verbose: bool,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
pub enum Relationship {
    /// Ancestors only, from the root down to the immediate parent.
    Parents,
    /// Full id lineage: the root down to the note itself.
    Chain,
    /// Notes sharing the same parent id (the note included).
    Siblings,
    /// Direct children.
    Children,
}
