use clap::Parser;
use std::path::PathBuf;

/// A utility to rename files based on their metadata
#[derive(Parser, Debug)]
#[command(name = "nameback")]
#[command(author = "Albert Hui <albert@securityronin.com>")]
#[command(version = env!("CARGO_PKG_VERSION"))]
#[command(long_version = concat!(
    env!("CARGO_PKG_VERSION"), "\n",
    "Copyright (c) 2025 Albert Hui <albert@securityronin.com>\n",
    "License: MIT"
))]
#[command(about = "Renames files based on metadata from exiftool", long_about = None)]
pub struct Args {
    /// Directory to scan for files
    #[arg(value_name = "DIRECTORY")]
    pub directory: Option<PathBuf>,

    /// Run in dry-run mode (preview changes without renaming)
    #[arg(short = 'n', long = "dry-run")]
    pub dry_run: bool,

    /// Skip hidden files and directories
    #[arg(short = 's', long = "skip-hidden")]
    pub skip_hidden: bool,

    /// Verbose logging
    #[arg(short = 'v', long = "verbose")]
    pub verbose: bool,

    /// Check and install missing dependencies
    #[arg(long = "install-deps")]
    pub install_deps: bool,

    /// Check dependency status without installing
    #[arg(long = "check-deps")]
    pub check_deps: bool,

    /// Disable GPS location in filenames (location is included by default)
    #[arg(long = "no-location")]
    pub no_location: bool,

    /// Disable timestamp in filenames (timestamp is included by default)
    #[arg(long = "no-timestamp")]
    pub no_timestamp: bool,

    /// Use single-frame video analysis for faster processing (default is multi-frame)
    #[arg(long = "fast-video")]
    pub fast_video: bool,

    /// Disable geocoding of GPS coordinates (shows raw coordinates instead of city names)
    #[arg(long = "no-geocode")]
    pub no_geocode: bool,
}

/// Parses command-line arguments
pub fn parse_args() -> Args {
    Args::parse()
}
