from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    EmployeeViewSet, AttendanceViewSet, PayrollViewSet,
    RecruitmentViewSet, JobApplicationViewSet, PublicRecruitmentViewSet,
    OnboardingViewSet, ContractViewSet,
    CommunicationViewSet, SurveyViewSet, FamilyViewSet,
    AttendanceSettingsView, ShiftTemplateViewSet, PayrollSettingsView,
    self_onboarding,
)

router = DefaultRouter()
router.register(r"employees", EmployeeViewSet, basename="employee")
router.register(r"attendance", AttendanceViewSet, basename="attendance")
router.register(r"shifts", ShiftTemplateViewSet, basename="shift-template")
router.register(r"payrolls", PayrollViewSet, basename="payroll")
router.register(r"recruitments", RecruitmentViewSet, basename="recruitment")
router.register(r"applications", JobApplicationViewSet, basename="application")
router.register(r"public/careers", PublicRecruitmentViewSet, basename="public-careers")
router.register(r"onboardings", OnboardingViewSet, basename="onboarding")
router.register(r"contracts", ContractViewSet, basename="contract")
router.register(r"communications", CommunicationViewSet, basename="communication")
router.register(r"surveys", SurveyViewSet, basename="survey")
router.register(r"families", FamilyViewSet, basename="family")

urlpatterns = [
    path("", include(router.urls)),
    path("self-onboarding/", self_onboarding, name="self-onboarding"),
    path("attendance-settings/", AttendanceSettingsView.as_view(), name="attendance-settings"),
    path("payroll-settings/", PayrollSettingsView.as_view(), name="payroll-settings"),
]