use clap::{Parser, ValueEnum};

#[derive(Clone, Debug, ValueEnum)]
pub enum FillMergedCells {
    None,
    Horizontal,
    Vertical,
    Both
}

impl ToString for FillMergedCells {
    fn to_string(&self) -> String {
        match self {
            FillMergedCells::None => "none".into(),
            FillMergedCells::Horizontal => "horizontal".into(),
            FillMergedCells::Vertical => "vertical".into(),
            FillMergedCells::Both => "both".into(),
        }
    }
}

#[derive(Parser, Debug)]
pub struct Arguments {
    /// Path to the xlsx file
    #[arg()]
    pub file: String,
    /// Separator
    #[arg(short, long, default_value_t = ';')]
    pub separator: char,
    /// Replacement char to replace separator in textcells
    #[arg(short, long)]
    pub replacement: Option<String>,
    /// include hidden lines to output
    #[arg(short, long, default_value_t=false)]
    pub include_hidden_lines: bool,
    /// If merged cells, fill horizontally, vertically, both, or none
    #[arg(short, long, default_value_t = FillMergedCells::None)]
    pub fill_merged_cells: FillMergedCells,    
}
