"""Events app service registration."""
from __future__ import annotations


def register_domain_services() -> None:
    """Register services for the events app.

    Events owns: Calendar, CalendarEntry, CalendarSlot, TicketType,
    Ticket, CalendarEntryPost.
    Cross-app calls go over HTTP via call_action() / fetch_data().
    """
    from shared.services.registry import services
    from shared.services.calendar_impl import SqlCalendarService

    services.calendar = SqlCalendarService()

    # Federation needed for AP shared infrastructure (activitypub blueprint)
    if not services.has("federation"):
        from shared.services.federation_impl import SqlFederationService
        services.federation = SqlFederationService()
