# ================================================================
# ENVIRONMENT-SPECIFIC CONFIGURATIONS
# shared/config/environments.py
# ================================================================

"""
Environment-specific configuration overrides
"""

from typing import Dict, Any

DEVELOPMENT_OVERRIDES: Dict[str, Any] = {
    "DEBUG": True,
    "LOG_LEVEL": "DEBUG",
    "DB_ECHO": True,
    "API_DOCS_ENABLED": True,
    "CORS_ORIGINS": "http://localhost:3000,http://localhost:3001,http://127.0.0.1:3000",
    "MOCK_EXTERNAL_APIS": True,
    "AUTO_RELOAD": True,
}

STAGING_OVERRIDES: Dict[str, Any] = {
    "DEBUG": False,
    "LOG_LEVEL": "INFO",
    "DB_ECHO": False,
    "API_DOCS_ENABLED": True,
    "MOCK_EXTERNAL_APIS": False,
    "AUTO_RELOAD": False,
}

PRODUCTION_OVERRIDES: Dict[str, Any] = {
    "DEBUG": False,
    "LOG_LEVEL": "WARNING",
    "DB_ECHO": False,
    "API_DOCS_ENABLED": False,
    "MOCK_EXTERNAL_APIS": False,
    "AUTO_RELOAD": False,
    "PROFILING_ENABLED": False,
    "RATE_LIMIT_ENABLED": True,
}

TESTING_OVERRIDES: Dict[str, Any] = {
    "TESTING": True,
    "DEBUG": True,
    "LOG_LEVEL": "DEBUG",
    "DATABASE_URL": "postgresql+asyncpg://test_user:test_pass@test-db:5432/test_db",
    "REDIS_URL": "redis://test-redis:6379",
    "MOCK_EXTERNAL_APIS": True,
    "EMAIL_VERIFICATION_REQUIRED": False,
    "RATE_LIMIT_ENABLED": False,
}

def get_environment_overrides(environment: str) -> Dict[str, Any]:
    """
    Get configuration overrides for specific environment
    
    Args:
        environment: Environment name (development, staging, production, testing)
        
    Returns:
        Dict: Configuration overrides
    """
    overrides = {
        "development": DEVELOPMENT_OVERRIDES,
        "staging": STAGING_OVERRIDES,
        "production": PRODUCTION_OVERRIDES,
        "testing": TESTING_OVERRIDES,
    }
    
    return overrides.get(environment.lower(), {})