# Copyright (C) 2018-2025 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later

from django.urls import path, include

from . import views

app_name = 'family'
urlpatterns = [
    path('list/', views.FamilyListView.as_view(), name="family_list"),
    path('create/', views.FamilyCreateView.as_view(), name="family_create"),
    path('<int:pk>/detail/', views.FamilyDetailView.as_view(), name="family_detail"),
    path('<int:pk>/update/', views.FamilyUpdateView.as_view(), name="family_update"),
    path('<int:pk>/update_pic/', views.FamilyPictureUpdateView.as_view(), name="update_pic"),
    path('<int:family_pk>/add_member/', views.FamilyAddMemberView.as_view(), name="family_add_member"),
    path('challenge/list/', views.ChallengeListView.as_view(), name="challenge_list"),
    path('challenge/create/', views.ChallengeCreateView.as_view(), name="challenge_create"),
    path('challenge/<int:pk>/detail/', views.ChallengeDetailView.as_view(), name="challenge_detail"),
    path('challenge/<int:pk>/update/', views.ChallengeUpdateView.as_view(), name="challenge_update"),
    path('manage/', views.FamilyManageView.as_view(), name="manage"),
    path('achievement/list/', views.AchievementListView.as_view(), name="achievement_list"),
    path('achievement/<int:pk>/validate/', views.AchievementValidateView.as_view(), name="achievement_validate"),
    path('achievement/<int:pk>/delete/', views.AchievementDeleteView.as_view(), name="achievement_delete"),
    path('api/family/', include(('family.api.urls', 'family_api'), namespace='api')),
]
