"""
ATS SDK Configuration
"""

from typing import Optional
from dataclasses import dataclass


@dataclass
class ATSConfig:
    """
    SDK Configuration
    
    Args:
        api_key: API key for authentication
        access_token: OAuth2 access token
        base_url: API base URL
        timeout: Request timeout in seconds
        max_retries: Maximum number of retry attempts
        retry_delay: Initial retry delay in seconds (exponential backoff)
    """
    
    api_key: Optional[str] = None
    access_token: Optional[str] = None
    base_url: str = "https://api.ats-satellite.dz/v1"
    timeout: int = 30
    max_retries: int = 3
    retry_delay: float = 1.0
    
    def __post_init__(self):
        """Validate configuration"""
        if not self.api_key and not self.access_token:
            raise ValueError("Either api_key or access_token must be provided")
