"""
AppConfig for django-notify-hub.

Add ``'django_notify_hub'`` to ``INSTALLED_APPS`` to activate.
"""
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


class DjangoNotifyHubConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "django_notify_hub"
    verbose_name = _("Notifications")

    def ready(self) -> None:
        # Reset the backend factory so it picks up settings on first access.
        from django_notify_hub.backends.factory import BackendFactory

        BackendFactory.reset()

