from django.urls import path

from django.conf import settings
from . import views
from django.conf.urls.static import static
from .views import QuizAutocomplete
app_name = 'library'

urlpatterns = [
    path('', views.overview_quiz, name='overview_quiz'),
    path('my/', views.overview_quiz_my, name='overview_quiz_my'),
    path('favorites/', views.overview_quiz_favorites, name='overview_quiz_favorites'),
    path('new/', views.new_quiz, name='new_quiz'),
    path('edit/<int:pk>/', views.edit_quiz, name='edit_quiz'),
    path('delete/<int:pk>/', views.delete_quiz, name='delete_quiz'),
    path('detail/<int:pk>/', views.detail_quiz, name='detail_quiz'), # Hier werden Fragen gelistet (Quiz-Spezifisch)
    path('question/new/', views.new_question, name='new_question'),
    path('question/edit/<int:pk>/', views.edit_question, name='edit_question'),
    path('question/delete/<int:pk>/', views.delete_question, name='delete_question'),
    path('detail/copy/<int:pk>/', views.copy_quiz, name='copy_quiz'),
    path('favorite_quiz/<int:pk>/', views.favorite_quiz, name='favorite_quiz'),
    path('critique/delete/<int:critique_id>/<int:quiz_id>', views.delete_critique, name='delete_critique'),
    path('quiz/reorder/', views.reorder_questions, name='reorder_questions'),
 
    path("quiz-names-json/", views.quiz_names_json, name="quiz_names_json"),
    path(
        "autocomplete/quiz",
        QuizAutocomplete.as_view(),
        name="quiz-autocomplete"
    ),
  
    

]
