from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    SkillViewSet, EventViewSet, TaskAreaViewSet,
    ShiftViewSet, ShiftSignupView, EventTemplateViewSet
)

router = DefaultRouter()
router.register('skills', SkillViewSet, basename='skill')
router.register('events', EventViewSet, basename='event')
router.register('task-areas', TaskAreaViewSet, basename='task-area')
router.register('shifts', ShiftViewSet, basename='shift')
router.register('templates', EventTemplateViewSet, basename='template')

urlpatterns = [
    path('shifts/<int:shift_id>/signup/', ShiftSignupView.as_view(), name='shift-signup'),
    path('shifts/<int:shift_id>/signup/<int:signup_id>/', ShiftSignupView.as_view(), name='shift-signup-detail'),
    path('', include(router.urls)),
]
