"""
Context Processors for Core Application

This module provides context processors that add common data
to template contexts across the entire application. Context
processors allow global data to be available in all templates.
"""

from django.conf import settings


def settings_context(request):
    """
    Add selected settings to the template context.
    
    This context processor makes certain Django settings available
    to all templates, allowing templates to access configuration
    values without having to pass them explicitly in every view.
    
    Args:
        request: The HTTP request object
        
    Returns:
        dict: Dictionary of settings to add to template context
    """
    return {
        # Debug mode status for conditional template behavior
        'DEBUG': settings.DEBUG,
        
        # Application version for display purposes
        'APP_VERSION': getattr(settings, 'APP_VERSION', '1.0.0'),
        
        # Application name for branding
        'APP_NAME': 'Stream Processor',
        
        # Telegram configuration status
        'TELEGRAM_ENABLED': settings.TELEGRAM_CONFIG.get('ENABLED', False),
        
        # Jingle detection status
        'JINGLES_ENABLED': settings.JINGLE_CONFIG.get('USE_JINGLES', False),
        
        # Static and media URLs
        'STATIC_URL': settings.STATIC_URL,
        'MEDIA_URL': settings.MEDIA_URL,
    }
