"""
Notification URL configuration.

Note: Now using django-notifications-hq for native Django notifications.
Legacy Novu endpoints are kept for backward compatibility.
"""

from django.urls import path

from .views import (
    AdminAlertView,
    AdminCriticalErrorView,
    CreateSubscriberView,
    NotificationListView,
    NotificationMarkReadView,
    NotificationUnreadCountView,
    NotifyModeratorsReportView,
    NotifyModeratorsSubmissionView,
    NotifyUserSubmissionStatusView,
    SystemAnnouncementView,
    TriggerNotificationView,
    UpdatePreferencesView,
    UpdateSubscriberView,
)

app_name = "notifications"

urlpatterns = [
    # ========== Native Notification Endpoints ==========
    # List notifications for current user
    path("", NotificationListView.as_view(), name="list"),
    # Mark notification(s) as read
    path("mark-read/", NotificationMarkReadView.as_view(), name="mark_read"),
    # Get unread count
    path("unread-count/", NotificationUnreadCountView.as_view(), name="unread_count"),
    
    # ========== Legacy/Compatibility Endpoints ==========
    # Subscriber management (legacy - kept for backward compatibility)
    path("subscribers/", CreateSubscriberView.as_view(), name="create_subscriber"),
    path("subscribers/update/", UpdateSubscriberView.as_view(), name="update_subscriber"),
    # Preferences
    path("preferences/", UpdatePreferencesView.as_view(), name="preferences"),
    # Trigger notifications
    path("trigger/", TriggerNotificationView.as_view(), name="trigger"),
    # Moderator notifications
    path(
        "moderators/submission/",
        NotifyModeratorsSubmissionView.as_view(),
        name="moderators_submission",
    ),
    path(
        "moderators/report/",
        NotifyModeratorsReportView.as_view(),
        name="moderators_report",
    ),
    # User notifications
    path(
        "user/submission-status/",
        NotifyUserSubmissionStatusView.as_view(),
        name="user_submission_status",
    ),
    # System notifications
    path(
        "system/announcement/",
        SystemAnnouncementView.as_view(),
        name="system_announcement",
    ),
    # Admin notifications
    path("admin/alert/", AdminAlertView.as_view(), name="admin_alert"),
    path(
        "admin/critical-error/",
        AdminCriticalErrorView.as_view(),
        name="admin_critical_error",
    ),
]

