from django.urls import path, include
from rest_framework.routers import DefaultRouter
from rest_framework_simplejwt import views as jwt_views
from . import views
from .views import (
    ClientViewSet,
    DepartmentViewSet,
    VendorsViewSet,
    CountryCodeListView,
    TblJobDescriptionView,
    ImpDepartmentViewSet,
    ClientDocumentViewSet,
    VendorDocumentViewSet,
    AssignJDView,
    RecruiterJDCountView,
    PostJDToLinkedIn,
    LinkedInStatus,
    JobFilterOptionsAPIView,
    ImplementerPortalConfigViewSet,
    LinkedInCallback,
    LinkedInAuthStart,
    careerViewSet,
    ConnectFounditPortal,
    PostToFounditView,
    ResumeUploadViewSet,
    CandidateProfileViewSet,
    CandidateResumeViewSet,
    public_job_detail,
    public_apply_job,
    ApplyJobRedirect,
    resume_basic_details,
    get_matched_profiles,
    shortlist_profiles,
    find_more_profiles,
    career_apply_job,
    career_open_jobs,
    career_job_detail,
    SearchPatternResetButton,
    interview_job_candidate_detail,
    interview_verify_otp,
    interview_send_otp,
    l0_interview_start,
    # ScheduleInterview,
    shortlist_details,
    save_candidate_availability,
    country_currency_list,
    submit_shortlist_details,
    l0_interview_record_video,
    l0_interview_eligibility_check,
    L0InterviewListViewSet,
    L0InterviewSessionsViewSet,
    l0_interview_final_summary,
    TblMatchedProfilesViewSet,
    ClientSubmissionData,
    secure_file_view,
    resolve_public_token,
    get_matched_profiles_candidate,
    public_job_share,
    candidate_consent_approval,
    email_share_job,
    DashboardOverview,
    delivery_manager_dashboard,
    recruiter_dashboard_stats,
    client_dashboard_stats,
    AuditLogView,
    dashboard_filter_data,
    ScreenScrapeView
)

router = DefaultRouter()
router.register(r"clients", ClientViewSet)
router.register(r"departments", DepartmentViewSet)
router.register(r"imp-departments", ImpDepartmentViewSet)
router.register(r"vendors", VendorsViewSet)
router.register(r"job_description", TblJobDescriptionView)
router.register(r"client-documents", ClientDocumentViewSet)
router.register(r"vendor-documents", VendorDocumentViewSet)
router.register(r"portal-configs", ImplementerPortalConfigViewSet)
router.register(r"careers", careerViewSet)
router.register(r"candidate-profile", CandidateProfileViewSet)
router.register(r"candidate-resume", CandidateResumeViewSet)
router.register(r'upload_candidate_resume', ResumeUploadViewSet, basename='upload_candidate_resume')
router.register(r"l0-interview-list", L0InterviewListViewSet)
router.register(r"l0-interview-session", L0InterviewSessionsViewSet)
router.register(r"matched-profiles-data", TblMatchedProfilesViewSet)

urlpatterns = [
    path("", include(router.urls)),
    path("country-codes/", CountryCodeListView.as_view(), name="country-codes"),
    path('google_mail_read/', views.MailReaderGoogle.as_view(), name='google_mail_read'),
    path('upload_jd_document/', views.UploadJobDescriptionFile.as_view(), name='upload_jd_document'),
    path('forgot-password/send-otp/', views.ForgotPasswordMailOTP.as_view(), name='forgot-password/send-otp'),
    path('forgot-password/verify-otp/', views.ForgotPasswordMailOTP.as_view(), name='forgot-password/verify-otp'),
    path('forgot-password/resend-otp/', views.ForgotPasswordMailOTP.as_view(), name='forgot-password/resend-otp'),
    path("linkedin/post-jd/", PostJDToLinkedIn.as_view()),
    path("linkedin/status/", LinkedInStatus.as_view()),
    path("recruiter-jd-count/", RecruiterJDCountView.as_view()),
    path("assign-jd/", AssignJDView.as_view()),
    path("job-description/filters/", JobFilterOptionsAPIView.as_view()),
    path("linkedin/callback/", LinkedInCallback.as_view()),
    path("linkedin/auth/", LinkedInAuthStart.as_view()),
    path("connect-foundit/", ConnectFounditPortal.as_view(), name='connect_foundit'),
    path('post-foundit/', PostToFounditView.as_view(), name='post_foundit'),
    path("assign-jd/update-recruiters/", AssignJDView.as_view()),
    path("public/job/<uuid:token>/", public_job_detail),
    path("public/apply/", public_apply_job),
    path('identify_matching_profiles/', views.IdentifyMatchingProfiles.as_view(), name='identify_matching_profiles'),
    path("apply/<uuid:token>/", ApplyJobRedirect.as_view()),
    path("resume-basic/<int:resume_id>/", resume_basic_details),
    path("matched-profiles/", get_matched_profiles),
    path('shortlist-profiles/', shortlist_profiles),
    path('find-more-profiles/', find_more_profiles),
    path('career/jobs/', career_open_jobs),
    path("career/apply/<int:jd_id>/", career_apply_job),
    path("career/job-detail/<int:jd_id>/", career_job_detail),
    path("search_pattern_reset/", SearchPatternResetButton.as_view()),
    path("interview/job-candidate-data/", interview_job_candidate_detail),
    path("interview/send_otp/", interview_send_otp),
    path("interview/verify_otp/", interview_verify_otp),
    path("interview/l0_start/", l0_interview_start),
    # path("schedule-interview/", ScheduleInterview.as_view(), name="schedule-interview"),
    path("shortlist-details/<str:token>/", shortlist_details),
    path("candidate-availability/", save_candidate_availability),
    path("country-currency/", country_currency_list),
    path("submit-shortlist-details/", submit_shortlist_details),
    path("interview/l0_video_record_save/", l0_interview_record_video),
    path("interview/l0_eligibility_check/", l0_interview_eligibility_check),
    path("interview/l0_interview_final_summary/", l0_interview_final_summary),
    path("client_submission_data/", ClientSubmissionData.as_view()),
    path("secure-file/", secure_file_view, name="secure_file"),
    path("resolve-token/<str:token>/", resolve_public_token),
    path("matched-profiles-candidate/", get_matched_profiles_candidate),
    path("job/<str:token>/", public_job_share, name="public_job_share"),
    path("candidate_consent_approval/", candidate_consent_approval),
    path("email-share-job/", email_share_job, name="email_share_job"),
    path("dashboard/overview/", DashboardOverview.as_view()),
    path("dashboard/filter-data/", dashboard_filter_data),
    path("jobdescription/delivery-manager-dashboard/", delivery_manager_dashboard),
    path('dashboard/client-stats/', client_dashboard_stats, name='client-stats'),
    path('dashboard/recruiter-stats/', recruiter_dashboard_stats, name='recruiter-stats'),
    path("audit-logs/", AuditLogView.as_view(), name="audit_logs"),
    path("scrape/", ScreenScrapeView.as_view(), name="screen_scrape"),
]
