"""WorkItem URL configuration."""

from __future__ import annotations

from django.urls import path

from simorgh.apps.workbox.api import views

urlpatterns = [
    # ── WorkItem canonical CRUD ─────────────────────────────────────
    path("workitems/", views.workitem_list, name="workitem-list"),
    path("workitems/my/", views.workitem_my, name="workitem-my"),
    path("workitems/<str:public_id>/", views.workitem_detail, name="workitem-detail"),
    path("workitems/<str:public_id>/complete/", views.workitem_complete, name="workitem-complete"),
    path("workitems/<str:public_id>/cancel/", views.workitem_cancel, name="workitem-cancel"),
    path("workitems/<str:public_id>/reassign/", views.workitem_reassign, name="workitem-reassign"),
    path("workitems/dashboard/", views.workbox_dashboard, name="workitem-dashboard"),

    # ── Backward-compatible workbox endpoints ────────────────────────
    path("", views.workbox_list, name="workbox-list"),
    path("my/", views.workbox_my_work, name="workbox-my-work"),
    path("pending-approvals/", views.workbox_pending_approvals, name="workbox-pending-approvals"),
    path("delegated/", views.workbox_delegated, name="workbox-delegated"),
    path("overdue/", views.workbox_overdue, name="workbox-overdue"),
    path("completed/", views.workbox_completed, name="workbox-completed"),
    path("dashboard/", views.workbox_dashboard, name="workbox-dashboard"),
    path("refresh/", views.workbox_refresh, name="workbox-refresh"),
]
