from django.urls import path
from .views import (
    AnnouncementListView,
    AnnouncementDetailView,
    AnnouncementsByCategory,
    AnnouncementCreateView,
    AnnouncementUpdateView,
    AnnouncementDeleteView,
    AnnouncementToggleView,
    DashboardWidgetsView,
    ForwardAnnouncementView,
)

urlpatterns = [
    path("",                          AnnouncementListView.as_view(),    name="announcements-list"),
    path("widgets/",                  DashboardWidgetsView.as_view(),    name="dashboard-widgets"),
    path("create/",                   AnnouncementCreateView.as_view(),  name="announcement-create"),
    path("<int:pk>/",                 AnnouncementDetailView.as_view(),  name="announcement-detail"),
    path("<int:pk>/update/",          AnnouncementUpdateView.as_view(),  name="announcement-update"),
    path("<int:pk>/delete/",          AnnouncementDeleteView.as_view(),  name="announcement-delete"),
    path("<int:pk>/toggle/",          AnnouncementToggleView.as_view(),  name="announcement-toggle"),
    path("<int:pk>/forward/",         ForwardAnnouncementView.as_view(), name="announcement-forward"),
    path("category/<str:category>/",  AnnouncementsByCategory.as_view(), name="announcements-by-category"),
]
