"""This module contains the urls of the ``questionnaires`` app"""

from macrosurl import url

from . import views


app_name = 'questionnaires'

urlpatterns = [
    # Quiz urls
    url(
        r'^quiz/create/$',
        views.QuizCreate.as_view(),
        name='quiz-create'
    ),
    url(
        r'^quiz/:quiz_uuid/$',
        views.QuizDetail.as_view(),
        name='quiz-detail'
    ),
    url(
        r'^quiz/:quiz_uuid/update$',
        views.QuizUpdate.as_view(),
        name='quiz-update'
    ),
    url(
        r'^quiz/:quiz_uuid/delete/$',
        views.QuizDelete.as_view(),
        name='quiz-delete'
    ),
    # Live quiz urls
    url(
        r'^livequiz/create/$',
        views.LiveQuizCreate.as_view(),
        name='livequiz-create'
    ),
    url(
        r'^livequiz/:livequiz_uuid/$',
        views.LiveQuizDetail.as_view(),
        name='livequiz-detail'
    ),
    url(
        r'^livequiz/:livequiz_uuid/update$',
        views.LiveQuizUpdate.as_view(),
        name='livequiz-update'
    ),
    url(
        r'^livequiz/:livequiz_uuid/delete/$',
        views.LiveQuizDelete.as_view(),
        name='livequiz-delete'
    ),
    # Polling urls
    url(
        r'^polling/create/$',
        views.PollingCreate.as_view(),
        name='polling-create'
    ),
    url(
        r'^polling/:polling_uuid/$',
        views.PollingDetail.as_view(),
        name='polling-detail'
    ),
    url(
        r'^polling/:polling_uuid/update$',
        views.PollingUpdate.as_view(),
        name='polling-update'
    ),
    url(
        r'^polling/:polling_uuid/delete/$',
        views.PollingDelete.as_view(),
        name='polling-delete'
    ),
    # Live polling urls
    url(
        r'^livepolling/create/$',
        views.LivePollingCreate.as_view(),
        name='livepolling-create'
    ),
    url(
        r'^livepolling/:livepolling_uuid/$',
        views.LivePollingDetail.as_view(),
        name='livepolling-detail'
    ),
    url(
        r'^livepolling/:livepolling_uuid/update$',
        views.LivePollingUpdate.as_view(),
        name='livepolling-update'
    ),
    url(
        r'^livepolling/:livepolling_uuid/delete/$',
        views.LivePollingDelete.as_view(),
        name='livepolling-delete'
    ),
    # Questions urls
    url(
        r'^:questionnaire_uuid/questions/sort/',
        views.QuestionsSort.as_view(),
        name='questions-sort'
    ),
    url(
        r'^:questionnaire_uuid/questions/delete/',
        views.QuestionsDelete.as_view(),
        name='questions-delete'
    ),
    # Choices question urls
    url(
        r'^:questionnaire_uuid/choicesquestion/create/$',
        views.ChoicesQuestionCreate.as_view(),
        name='choicesquestion-create'
    ),
    url(
        r'^:questionnaire_uuid/choicesquestion/:question_uuid/',
        views.ChoicesQuestionUpdate.as_view(),
        name='choicesquestion-update'
    ),
    # Image choices question urls
    url(
        r'^:questionnaire_uuid/imagechoicesquestion/create/$',
        views.ImageChoicesQuestionCreate.as_view(),
        name='imagechoicesquestion-create'
    ),
    url(
        r'^:questionnaire_uuid/imagechoicesquestion/:question_uuid/',
        views.ImageChoicesQuestionUpdate.as_view(),
        name='imagechoicesquestion-update'
    ),
    # Open question urls
    url(
        r'^:questionnaire_uuid/openquestion/create/$',
        views.OpenQuestionCreate.as_view(),
        name='openquestion-create'
    ),
    url(
        r'^:questionnaire_uuid/openquestion/:question_uuid/',
        views.OpenQuestionUpdate.as_view(),
        name='openquestion-update'
    ),
]
