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

from django.urls import path

from . import views

app_name = 'food'

urlpatterns = [
    path('', views.FoodListView.as_view(), name='food_list'),
    path('<int:slug>/', views.QRCodeCreateView.as_view(), name='qrcode_create'),
    path('<int:slug>/add/basic/', views.BasicFoodCreateView.as_view(), name='basicfood_create'),
    path('add/transformed/', views.TransformedFoodCreateView.as_view(), name='transformedfood_create'),
    path('update/<int:pk>/', views.FoodUpdateView.as_view(), name='food_update'),
    path('update/ingredients/<int:pk>/', views.ManageIngredientsView.as_view(), name='manage_ingredients'),
    path('detail/<int:pk>/', views.FoodDetailView.as_view(), name='food_view'),
    path('detail/basic/<int:pk>/', views.BasicFoodDetailView.as_view(), name='basicfood_view'),
    path('detail/transformed/<int:pk>/', views.TransformedFoodDetailView.as_view(), name='transformedfood_view'),
    path('add/ingredient/<int:pk>/', views.AddIngredientView.as_view(), name='add_ingredient'),
    path('redirect/', views.QRCodeRedirectView.as_view(), name='redirect_view'),
    # TODO not always store activity_pk in url
    # path('activity/<int:activity_pk>/dishes/add/', views.DishCreateView.as_view(), name='dish_create'),
    # path('activity/<int:activity_pk>/dishes/', views.DishListView.as_view(), name='dish_list'),
    # path('activity/<int:activity_pk>/dishes/<int:pk>/', views.DishDetailView.as_view(), name='dish_detail'),
    # path('activity/<int:activity_pk>/dishes/<int:pk>/update/', views.DishUpdateView.as_view(), name='dish_update'),
    # path('activity/<int:activity_pk>/dishes/<int:pk>/delete/', views.DishDeleteView.as_view(), name='dish_delete'),
    # path('activity/<int:activity_pk>/order/', views.OrderCreateView.as_view(), name='order_create'),
    # path('activity/<int:activity_pk>/orders/', views.OrderListView.as_view(), name='order_list'),
    # path('activity/<int:activity_pk>/orders/served', views.ServedOrderListView.as_view(), name='served_order_list'),
    # path('activity/<int:activity_pk>/kitchen/', views.KitchenView.as_view(), name='kitchen'),
    # path('recipe/add/', views.RecipeCreateView.as_view(), name='recipe_create'),
    # path('recipe/', views.RecipeListView.as_view(), name='recipe_list'),
    # path('recipe/<int:pk>/', views.RecipeDetailView.as_view(), name='recipe_detail'),
    # path('recipe/<int:pk>/update/', views.RecipeUpdateView.as_view(), name='recipe_update'),
    # path('update/ingredients/<int:pk>/recipe/', views.UseRecipeView.as_view(), name='recipe_use'),
    # path('ajax/get_ingredients/', views.get_ingredients_for_recipe, name='get_ingredients'),
]
