from django.urls import path

from . import ui_views
from . import views

app_name = "inquiries"

urlpatterns = [
    # Inquiries UI Views
    path("", ui_views.inquiry_list, name="inquiry_list"),
    path("new/", ui_views.inquiry_create, name="inquiry_create"),
    path("<uuid:pk>/", ui_views.inquiry_detail, name="inquiry_detail"),
    path("<uuid:pk>/edit/", ui_views.inquiry_edit, name="inquiry_edit"),
    path("<uuid:pk>/activate/", ui_views.inquiry_activate, name="inquiry_activate"),
    path("<uuid:pk>/assign/", ui_views.inquiry_assign, name="inquiry_assign"),
    path("<uuid:pk>/change-status/", ui_views.inquiry_change_status, name="inquiry_change_status"),
    path("<uuid:pk>/reopen/", ui_views.inquiry_reopen, name="inquiry_reopen"),
    path("<uuid:pk>/add-note/", ui_views.inquiry_add_note, name="inquiry_add_note"),
    path("<uuid:pk>/respond/", ui_views.inquiry_respond, name="inquiry_respond"),
    path("<uuid:pk>/transfer-to-department/", ui_views.inquiry_transfer_to_department, name="inquiry_transfer_to_department"),
    path("<uuid:pk>/department-response/", ui_views.inquiry_department_response, name="inquiry_department_response"),
    path("<uuid:pk>/review-dept-response/", ui_views.inquiry_review_dept_response, name="inquiry_review_dept_response"),
    path("<uuid:pk>/send-dept-response-reminder/", ui_views.inquiry_send_dept_response_reminder, name="inquiry_send_dept_response_reminder"),
    path("<uuid:pk>/update-contact/", ui_views.inquiry_update_contact_stage, name="inquiry_update_contact_stage"),
    path("export/incoming/", ui_views.inquiry_export_incoming, name="inquiry_export_incoming"),
    path("export/outgoing/", ui_views.inquiry_export_outgoing, name="inquiry_export_outgoing"),
    # Public Inquiry Form (No Authentication Required)
    path("public/submit/", ui_views.public_inquiry_submit, name="public_inquiry_submit"),
    path("public/success/<str:reference>/", ui_views.public_inquiry_success, name="public_inquiry_success"),
    path("public/track/", ui_views.public_inquiry_track, name="public_inquiry_track"),
    path("<uuid:pk>/send-to-staff/", ui_views.inquiry_send_to_staff, name="inquiry_send_to_staff"),
    path("<uuid:pk>/send-to/", ui_views.inquiry_send_to, name="inquiry_send_to"),
    path("<uuid:pk>/escalate/", ui_views.inquiry_escalate, name="inquiry_escalate"),
    # Token-based explanation form (No Authentication Required)
    path("<uuid:inquiry_id>/explain/<str:token>/", views.inquiry_explanation_form, name="inquiry_explanation_form"),
    # Token-based department response (No Authentication Required)
    path("<uuid:pk>/respond/<str:token>/", views.inquiry_respond_with_token, name="inquiry_respond_with_token"),
]
