from django.urls import path, include
from rest_framework.routers import SimpleRouter as DefaultRouter

from .views import (
    NotificationListView,
    MarkNotificationReadView,
    MarkAllNotificationsReadView,
    NotificationTemplateViewSet,
    ActiveTemplatesView,
)

router = DefaultRouter()
router.register("templates", NotificationTemplateViewSet, basename="notification-template")

urlpatterns = [
    path("templates/active/", ActiveTemplatesView.as_view(), name="notification-templates-active"),
    path("", include(router.urls)),
    path("", NotificationListView.as_view(), name="notification-list"),
    path("<int:pk>/read/", MarkNotificationReadView.as_view(), name="notification-read"),
    path("mark-all-read/", MarkAllNotificationsReadView.as_view(), name="notification-mark-all-read"),
]
