from django.urls import path

from agir.voting_proxies.views import (
    VotingProxyRequestCreateAPIView,
    VotingProxyCreateAPIView,
    VotingProxyRetrieveUpdateAPIView,
    ReplyToVotingProxyRequestsAPIView,
    VotingProxyForRequestRetrieveAPIView,
    VotingProxyRequestConfirmAPIView,
    AcceptedVotingProxyRequestListAPIView,
    VotingProxyRequestCancelAPIView,
    VotingProxyRequestAcceptationCancelAPIView,
    VotingProxyRequestRetrieveUpdateAPIView,
    VotingProxyRequestsForProxyListAPIView,
)

urlpatterns = [
    path(
        "api/procurations/demande/",
        VotingProxyRequestCreateAPIView.as_view(),
        name="api_create_voting_proxy_request",
    ),
    path(
        "api/procurations/demande/<uuid:pk>/",
        VotingProxyRequestRetrieveUpdateAPIView.as_view(),
        name="api_retrieve_update_voting_proxy_request",
    ),
    path(
        "api/procurations/demande/reponse/",
        AcceptedVotingProxyRequestListAPIView.as_view(),
        name="api_list_accepted_voting_proxy_requests",
    ),
    path(
        "api/procurations/demande/<uuid:pk>/volontaire/",
        VotingProxyForRequestRetrieveAPIView.as_view(),
        name="api_retrieve_voting_proxy_for_request",
    ),
    path(
        "api/procurations/demande/confirmer/",
        VotingProxyRequestConfirmAPIView.as_view(),
        name="api_confirm_voting_proxy_request",
    ),
    path(
        "api/procurations/demande/annuler/",
        VotingProxyRequestCancelAPIView.as_view(),
        name="api_cancel_voting_proxy_request",
    ),
    path(
        "api/procurations/demande/se-desister/",
        VotingProxyRequestAcceptationCancelAPIView.as_view(),
        name="api_cancel_voting_proxy_request_acceptation",
    ),
    path(
        "api/procurations/volontaire/",
        VotingProxyCreateAPIView.as_view(),
        name="api_create_voting_proxy",
    ),
    path(
        "api/procurations/volontaire/<uuid:pk>/",
        VotingProxyRetrieveUpdateAPIView.as_view(),
        name="api_retrieve_update_voting_proxy",
    ),
    path(
        "api/procurations/volontaire/<uuid:pk>/proposition/",
        ReplyToVotingProxyRequestsAPIView.as_view(),
        name="api_reply_to_voting_proxy_requests",
    ),
    path(
        "api/procurations/volontaire/<uuid:pk>/demandes/",
        VotingProxyRequestsForProxyListAPIView.as_view(),
        name="api_list_voting_proxy_requests_for_proxy",
    ),
]
