"""
Notification Service URL Configuration.
"""
from django.urls import include, path
from rest_framework.routers import DefaultRouter

from .views import (
    NotificationCategoryViewSet,
    NotificationTemplateViewSet,
    NotificationViewSet,
    NotificationLogViewSet,
    UserNotificationPreferenceViewSet,
    SendNotificationView,
    ScheduleNotificationView,
)

app_name = 'notification'

router = DefaultRouter()
router.register(r'categories', NotificationCategoryViewSet, basename='category')
router.register(r'templates', NotificationTemplateViewSet, basename='template')
router.register(r'notifications', NotificationViewSet, basename='notification')
router.register(r'logs', NotificationLogViewSet, basename='log')
router.register(r'preferences', UserNotificationPreferenceViewSet, basename='preference')

urlpatterns = [
    path('', include(router.urls)),
    path('send/', SendNotificationView.as_view(), name='send'),
    path('schedule/', ScheduleNotificationView.as_view(), name='schedule'),
]
