"""Main error interface for the Trax platform.

This module provides a simple interface for working with the error
classification system.
"""

from .base import (
    TraxError, NetworkError, APIError, FileSystemError, ValidationError,
    ProcessingError, ConfigurationError, ResourceError,
    ConnectionError, TimeoutError, DNSResolutionError,
    AuthenticationError, RateLimitError, QuotaExceededError,
    ServiceUnavailableError, InvalidResponseError,
    FileNotFoundError, PermissionError, DiskSpaceError, CorruptedFileError,
    InvalidInputError, MissingRequiredFieldError, FormatError,
    TranscriptionError, EnhancementError, MediaProcessingError, AudioConversionError,
    MissingConfigError, InvalidConfigError, EnvironmentError,
    MemoryError, CPUError,
    create_network_error, create_api_error, create_filesystem_error, create_validation_error
)

from .codes import (
    ErrorCode, ErrorCategory, ErrorSeverity,
    NETWORK_CONNECTION_FAILED, NETWORK_TIMEOUT, DNS_RESOLUTION_FAILED,
    API_AUTHENTICATION_FAILED, API_RATE_LIMIT_EXCEEDED, API_QUOTA_EXCEEDED,
    API_SERVICE_UNAVAILABLE, API_INVALID_RESPONSE,
    FILE_NOT_FOUND, FILE_PERMISSION_DENIED, DISK_SPACE_INSUFFICIENT, FILE_CORRUPTED,
    INVALID_INPUT, MISSING_REQUIRED_FIELD, INVALID_FORMAT,
    TRANSCRIPTION_FAILED, ENHANCEMENT_FAILED, MEDIA_PROCESSING_FAILED, AUDIO_CONVERSION_FAILED,
    MISSING_CONFIGURATION, INVALID_CONFIGURATION, ENVIRONMENT_ERROR,
    MEMORY_INSUFFICIENT, CPU_OVERLOADED,
    get_error_code, get_error_codes_by_category, get_error_codes_by_severity,
    get_retryable_error_codes, is_retryable_error_code
)

from .classification import (
    classify_error, extract_error_context, is_retryable_error,
    get_error_severity, get_error_category, wrap_error,
    create_error_from_code, get_actionable_message,
    error_handler, async_error_handler
)

# Export main classes and functions
__all__ = [
    # Base error classes
    'TraxError',
    
    # Network errors
    'NetworkError', 'ConnectionError', 'TimeoutError', 'DNSResolutionError',
    
    # API errors
    'APIError', 'AuthenticationError', 'RateLimitError', 'QuotaExceededError',
    'ServiceUnavailableError', 'InvalidResponseError',
    
    # File system errors
    'FileSystemError', 'FileNotFoundError', 'PermissionError', 'DiskSpaceError', 'CorruptedFileError',
    
    # Validation errors
    'ValidationError', 'InvalidInputError', 'MissingRequiredFieldError', 'FormatError',
    
    # Processing errors
    'ProcessingError', 'TranscriptionError', 'EnhancementError', 'MediaProcessingError', 'AudioConversionError',
    
    # Configuration errors
    'ConfigurationError', 'MissingConfigError', 'InvalidConfigError', 'EnvironmentError',
    
    # Resource errors
    'ResourceError', 'MemoryError', 'CPUError',
    
    # Error codes
    'ErrorCode', 'ErrorCategory', 'ErrorSeverity',
    'NETWORK_CONNECTION_FAILED', 'NETWORK_TIMEOUT', 'DNS_RESOLUTION_FAILED',
    'API_AUTHENTICATION_FAILED', 'API_RATE_LIMIT_EXCEEDED', 'API_QUOTA_EXCEEDED',
    'API_SERVICE_UNAVAILABLE', 'API_INVALID_RESPONSE',
    'FILE_NOT_FOUND', 'FILE_PERMISSION_DENIED', 'DISK_SPACE_INSUFFICIENT', 'FILE_CORRUPTED',
    'INVALID_INPUT', 'MISSING_REQUIRED_FIELD', 'INVALID_FORMAT',
    'TRANSCRIPTION_FAILED', 'ENHANCEMENT_FAILED', 'MEDIA_PROCESSING_FAILED', 'AUDIO_CONVERSION_FAILED',
    'MISSING_CONFIGURATION', 'INVALID_CONFIGURATION', 'ENVIRONMENT_ERROR',
    'MEMORY_INSUFFICIENT', 'CPU_OVERLOADED',
    
    # Error code utilities
    'get_error_code', 'get_error_codes_by_category', 'get_error_codes_by_severity',
    'get_retryable_error_codes', 'is_retryable_error_code',
    
    # Error creation utilities
    'create_network_error', 'create_api_error', 'create_filesystem_error', 'create_validation_error',
    'create_error_from_code',
    
    # Error classification utilities
    'classify_error', 'extract_error_context', 'is_retryable_error',
    'get_error_severity', 'get_error_category', 'wrap_error',
    'get_actionable_message',
    
    # Error handling decorators
    'error_handler', 'async_error_handler',
]
