"""
Jingles Application Configuration

This module defines the configuration for the jingles Django application,
which handles jingle detection, ad break identification, and template management.
"""

from django.apps import AppConfig


class JinglesConfig(AppConfig):
    """
    Configuration class for the jingles application.
    
    This class defines the jingles application settings and handles
    application initialization, including setting up signal handlers
    for jingle detection and ad break processing.
    
    Attributes:
        default_auto_field (str): The default primary key field type for models
        name (str): The application name used by Django
        verbose_name (str): Human-readable name for the application
    """
    
    # Use BigAutoField as the default primary key type
    default_auto_field = 'django.db.models.BigAutoField'
    
    # Application name as registered in Django
    name = 'apps.jingles'
    
    # Human-readable application name
    verbose_name = 'Jingle Detection'
    
    def ready(self):
        """
        Perform initialization when the application is ready.
        
        This method is called once Django has loaded all applications
        and models. It imports signal handlers to set up automatic
        jingle detection and ad break processing.
        """
        # Import signal handlers for jingle detection
        try:
            import apps.jingles.signals  # noqa: F401
        except ImportError:
            # Signal handlers are optional
            pass
