//! Scan-related configuration types.

use std::path::PathBuf;

use serde::Deserialize;

/// Scan configuration.
#[derive(Debug, Clone, Deserialize)]
#[serde(default)]
pub struct ScanConfig {
    /// Directories to exclude from scanning.
    pub exclude: Vec<String>,

    /// Maximum file size to scan (bytes).
    pub max_file_size: u64,

    /// Whether to include test files.
    pub include_tests: bool,
}

/// Alias suggestion configuration.
#[derive(Debug, Clone, Deserialize)]
#[serde(default)]
pub struct AliasConfig {
    /// Whether to auto-suggest aliases for shared concepts.
    pub auto_suggest: bool,

    /// Whether to auto-accept aliases to Tier 0 sources.
    pub auto_accept_tier0: bool,

    /// Whether to automatically create aliases when conflicts are detected.
    ///
    /// When enabled, tail-path matching during conflict detection will
    /// persist aliases (e.g., `code://rust/tls/cert_verification` →
    /// `rfc://5246/tls/cert_verification`) for faster future queries.
    pub auto_create_aliases: bool,
}

/// Corpus builder configuration.
#[derive(Debug, Clone, Deserialize)]
#[serde(default)]
pub struct CorpusConfig {
    /// Directory for caching downloaded RFCs and OWASP cheat sheets.
    pub cache_dir: PathBuf,

    /// Whether to include the hardcoded corpus (built-in assertions).
    pub include_hardcoded: bool,

    /// Whether to include RFC normative statements.
    pub include_rfc: bool,

    /// Whether to include OWASP cheat sheet recommendations.
    pub include_owasp: bool,

    /// Whether to include vendor documentation claims.
    pub include_vendor: bool,

    /// Override the default RFC list (if None, uses default list).
    pub rfc_list: Option<Vec<u32>>,
}
