"""
URL patterns for the external API.
Mounted at /api/v1/external/.
"""

from django.urls import path

from .api_views import (
    ExternalAppreciationCreateView,
    ExternalAppreciationRetrieveView,
    ExternalAreasListView,
    ExternalComplaintCreateView,
    ExternalComplaintRetrieveView,
    ExternalComplaintSatisfactionView,
    ExternalDepartmentsListView,
    ExternalDoctorRatingCreateView,
    ExternalHospitalsListView,
    ExternalInquiryCreateView,
    ExternalInquiryRetrieveView,
    ExternalLocationTypesView,
    ExternalObservationCreateView,
    ExternalObservationRetrieveView,
    ExternalSectionsListView,
    ExternalSuggestionCreateView,
    ExternalSuggestionRetrieveView,
)

app_name = "external_api"

urlpatterns = [
    # Lookup / Dropdown endpoints
    path(
        "hospitals/",
        ExternalHospitalsListView.as_view(),
        name="external-hospitals",
    ),
    path(
        "location-types/",
        ExternalLocationTypesView.as_view(),
        name="external-location-types",
    ),
    path(
        "areas/",
        ExternalAreasListView.as_view(),
        name="external-areas",
    ),
    path(
        "departments/",
        ExternalDepartmentsListView.as_view(),
        name="external-departments",
    ),
    path(
        "sections/",
        ExternalSectionsListView.as_view(),
        name="external-sections",
    ),
    # Complaints
    path(
        "complaints/",
        ExternalComplaintCreateView.as_view(),
        name="external-complaint-create",
    ),
    path(
        "complaints/list/",
        ExternalComplaintRetrieveView.as_view(),
        name="external-complaint-list",
    ),
    path(
        "complaints/<str:reference_number>/",
        ExternalComplaintRetrieveView.as_view(),
        name="external-complaint-detail",
    ),
    path(
        "complaints/<str:reference_number>/satisfaction/",
        ExternalComplaintSatisfactionView.as_view(),
        name="external-complaint-satisfaction",
    ),
    # Inquiries
    path(
        "inquiries/",
        ExternalInquiryCreateView.as_view(),
        name="external-inquiry-create",
    ),
    path(
        "inquiries/list/",
        ExternalInquiryRetrieveView.as_view(),
        name="external-inquiry-list",
    ),
    path(
        "inquiries/<str:reference_number>/",
        ExternalInquiryRetrieveView.as_view(),
        name="external-inquiry-detail",
    ),
    # Observations
    path(
        "observations/",
        ExternalObservationCreateView.as_view(),
        name="external-observation-create",
    ),
    path(
        "observations/list/",
        ExternalObservationRetrieveView.as_view(),
        name="external-observation-list",
    ),
    path(
        "observations/<str:tracking_code>/",
        ExternalObservationRetrieveView.as_view(),
        name="external-observation-detail",
    ),
    # Appreciations
    path(
        "appreciations/",
        ExternalAppreciationCreateView.as_view(),
        name="external-appreciation-create",
    ),
    path(
        "appreciations/list/",
        ExternalAppreciationRetrieveView.as_view(),
        name="external-appreciation-list",
    ),
    path(
        "appreciations/<uuid:pk>/",
        ExternalAppreciationRetrieveView.as_view(),
        name="external-appreciation-detail",
    ),
    # Suggestions
    path(
        "suggestions/",
        ExternalSuggestionCreateView.as_view(),
        name="external-suggestion-create",
    ),
    path(
        "suggestions/list/",
        ExternalSuggestionRetrieveView.as_view(),
        name="external-suggestion-list",
    ),
    path(
        "suggestions/<uuid:pk>/",
        ExternalSuggestionRetrieveView.as_view(),
        name="external-suggestion-detail",
    ),
    # Doctor Ratings
    path(
        "doctor-ratings/",
        ExternalDoctorRatingCreateView.as_view(),
        name="external-doctor-rating-create",
    ),
]
