from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from apps.notifications.views import (
    create_notification,
    notification_list,
    delete_notification,
    mark_as_read,
    sent_notifications_list,
    delete_sent_notification_view
)

urlpatterns = [
    path('create/', create_notification, name='create_notification'),
    path('list/', notification_list, name='notification_list'),
    path('sent/', sent_notifications_list, name='sent_notifications_list'),
    path('delete/<int:notification_id>/', delete_notification, name='delete_notification'),
    path('delete_sent/<int:notification_id>/', delete_sent_notification_view, name='delete_sent_notification'),
    path('read/<int:notification_id>/', mark_as_read, name='mark_as_read'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
