"""Per-domain widget registration.

Called once at startup after domain services are registered.
Only registers widgets for domains that are actually available.
"""
from __future__ import annotations


def register_all_widgets() -> None:
    from shared.services.registry import services

    if services.has("calendar"):
        from .calendar_widgets import register_calendar_widgets
        register_calendar_widgets()

    if services.has("market"):
        from .market_widgets import register_market_widgets
        register_market_widgets()

    if services.has("cart"):
        from .cart_widgets import register_cart_widgets
        register_cart_widgets()
