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

/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public struct 'CacheArgs'. Replace with real documentation. (2025-12-30T22:23:21Z)
#[derive(Args)]
pub struct CacheArgs {
    #[command(subcommand)]
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'command' in 'CacheArgs'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub command: CacheCommands,
}

/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public enum 'CacheCommands'. Replace with real documentation. (2025-12-30T22:23:21Z)
#[derive(Subcommand)]
pub enum CacheCommands {
    /// List cached templates
    List,
    /// Clean all cached templates
    Clean,
    /// Add a template to cache from a local directory or archive
    Add {
        /// Name of the template to register
        name: String,
        /// Path to the template source (directory or archive)
        path: PathBuf,
    },
    /// Remove a template from cache
    Remove {
        /// Name of the template to remove
        name: String,
    },
    /// Show cache directory path
    Path,

    /// Manage template cache entries
    Templates(TemplateCacheArgs),

    /// Manage module index cache (index_*.json and modules/<id>.json)
    Modules(ModuleCacheArgs),
}

/// Arguments for `kam cache templates`.
#[derive(Args)]
pub struct TemplateCacheArgs {
    #[command(subcommand)]
    /// Template cache command.
    pub command: TemplateCacheCommands,
}

/// Commands for template cache entries.
#[derive(Subcommand)]
pub enum TemplateCacheCommands {
    /// List cached templates
    List,
    /// Clean all cached templates
    Clean,
    /// Add a template to cache from a local directory or archive
    Add {
        /// Name of the template to register
        name: String,
        /// Path to the template source (directory or archive)
        path: PathBuf,
    },
    /// Remove a template from cache
    Remove {
        /// Name of the template to remove
        name: String,
    },
    /// Show template cache directory path
    Path,
}

/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public struct 'ModuleCacheArgs'. Replace with real documentation. (2025-12-30T22:23:21Z)
#[derive(Args)]
pub struct ModuleCacheArgs {
    #[command(subcommand)]
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'command' in 'ModuleCacheArgs'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub command: ModuleCacheCommands,
}

/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public enum 'ModuleCacheCommands'. Replace with real documentation. (2025-12-30T22:23:21Z)
#[derive(Subcommand)]
pub enum ModuleCacheCommands {
    /// List module index and module detail cache files
    List,
    /// Clean module cache (remove index_*.json and modules/ directory)
    Clean,
    /// Show module cache directory path
    Path,
    /// Remove a specific cache file (exact filename or module id for modules/<id>.json)
    Remove {
        /// Filename or module id to remove
        name: String,
    },
}
