""" URLS to display the Riichi Mahjong Rankings and the Ladder system."""

from django.urls import path
from django.views.generic import RedirectView

from . import views

urlpatterns = [
    path("", RedirectView.as_view(url='/ranking/mahjong-ladder/', permanent=True)),
    path('event/<int:event>/add-hanchan/', views.HanchanForm.as_view(), name="add-hanchan-form"),
    path('event/<int:event>/edit/', views.EventHanchanForm.as_view(), name="event-hanchan-form"),
    path('event/<int:event>/mahjong/', views.EventHanchanList.as_view(), name="event-hanchan-list"),
    path('event/<int:event>/mahjong-ranking/', views.EventRankingList.as_view(), name="event-ranking"),
    path('hanchan/<int:hanchan>/edit/', views.HanchanForm.as_view(), name="edit-hanchan"),
    path('hanchan/<int:hanchan>/delete/', views.DeleteHanchan.as_view(), name="delete-hanchan"),
    path('mahjong-ladder/', views.SeasonRankingList.as_view(), name="mahjong-ladder"),
    path('mahjong-ladder/<int:season>/', views.SeasonRankingList.as_view(), name="mahjong-ladder"),
    path('player/<slug:username>/dan/', views.PlayerDanScore.as_view(), name="player-dan-score"),
    path('player/<slug:username>/invalid/', views.PlayerInvalidScore.as_view(), name="player-invalid-score"),
    path('player/<slug:username>/kyu/', views.PlayerKyuScore.as_view(), name="player-kyu-score"),
    path('player/<slug:username>/ladder/', views.PlayerLadderScore.as_view(), name="player-ladder-score"),
    path('mahjong/', views.KyuDanRankingList.as_view(), name="kyudanranking-list"),
    path('mahjong/<str:order_by>/', views.KyuDanRankingList.as_view(), name="kyudanranking-list"),
]
