# app/modules/prospecting/config.py
"""
Module configuration.

Environment-based configuration using Pydantic Settings.
Settings are loaded from environment variables with PROSPECTING_ prefix.

Example:
    PROSPECTING_PAGESPEED_API_KEY=your_key
"""
from pydantic_settings import BaseSettings


class ModuleConfig(BaseSettings):
    """Configuration for prospecting module."""

    # PageSpeed Insights API key (optional, free 25k/day without key)
    pagespeed_api_key: str = ""

    # HTTP request timeout in seconds
    http_timeout: int = 10

    # Batch operation limits
    batch_size: int = 100

    # Max concurrent HTTP requests for batch scanning
    max_concurrent_requests: int = 10

    # Delay between prospects in batch scans (seconds) — be polite to target sites
    batch_delay_seconds: float = 1.0

    model_config = {"env_prefix": "PROSPECTING_", "env_file": ".env", "extra": "ignore"}


# Export for auto-discovery
config_class = ModuleConfig
config = ModuleConfig()
