# ============================================================
# ADDITIVE: Hiring Plus URLs
# Mounted from hrnexus/urls.py as:  path('api/', include('Recruitment.urls_plus'))
# Final URLs: /api/recruitment/hiring-plus/...
# ============================================================
from django.urls import path
from rest_framework.routers import SimpleRouter

from . import views_plus as v

router = SimpleRouter()
P = "recruitment/hiring-plus/"
router.register(P + "checklist", v.ChecklistViewSet, basename="hp-checklist")
router.register(P + "questions", v.HiringQuestionViewSet, basename="hp-questions")
router.register(P + "interviewers", v.InterviewerPanelViewSet, basename="hp-interviewers")
router.register(P + "verifications", v.VerificationViewSet, basename="hp-verifications")
router.register(P + "approvals", v.CandidateApprovalViewSet, basename="hp-approvals")
router.register(P + "hike-approvals", v.HikeApprovalViewSet, basename="hp-hike")
router.register(P + "upload-links", v.UploadLinkViewSet, basename="hp-upload-links")

urlpatterns = [
    path(P + "health/", v.HealthView.as_view(), name="hp_health"),          # public: is the module loaded?
    path(P + "whoami/", v.WhoAmIView.as_view(), name="hp_whoami"),          # what does my token resolve to?
    path(P + "meta/", v.HiringPlusMetaView.as_view(), name="hp_meta"),
    path(P + "candidates/<str:pk>/kit/", v.CandidateKitView.as_view(), name="hp_kit"),
    path(P + "candidates/<str:pk>/experience/", v.CandidateExperienceView.as_view(), name="hp_experience"),
    path(P + "candidates/<str:pk>/jd/", v.CandidateJDView.as_view(), name="hp_jd"),
    path(P + "candidates/<str:pk>/onboarding/", v.OnboardingTriggerView.as_view(), name="hp_onboarding"),
    path(P + "requisitions/<str:pk>/roles/", v.RequisitionRolesView.as_view(), name="hp_req_roles"),
    path(P + "public/upload/<str:token>/", v.PublicUploadView.as_view(), name="hp_public_upload"),
] + router.urls
