"""DMS WebSocket URL routing."""

from __future__ import annotations

from django.urls import re_path

from simorgh.apps.dms.consumers.comments import CommentsConsumer
from simorgh.apps.dms.consumers.document import DocumentConsumer
from simorgh.apps.dms.consumers.notifications import DmsNotificationConsumer

websocket_urlpatterns = [
    # Live document presence + version update feed.
    re_path(
        r"^ws/dms/documents/(?P<public_id>[0-9a-f-]+)/$",
        DocumentConsumer.as_asgi(),
    ),
    # Realtime comment feed for a document.
    re_path(
        r"^ws/dms/documents/(?P<public_id>[0-9a-f-]+)/comments/$",
        CommentsConsumer.as_asgi(),
    ),
    # Per-user DMS notification stream.
    re_path(
        r"^ws/dms/notifications/$",
        DmsNotificationConsumer.as_asgi(),
    ),
]
