# -*- encoding: utf-8 -*-

from django.urls import path, include
from rest_framework.authtoken.views import obtain_auth_token

from .views import (
    SubChannel_ListView,
    SubChannel_DetailView,
    Filter_ListView,
    Filter_DetailView,
    Subscription_ListView,
    Subscription_DetailView,
    Subscription_SubChannelView,
    SavedGuild_ListView,
    SavedGuild_DetailView,
    TrackedContent_ListView,
    TrackedContent_DetailView,
    ArticleMutator_ListView,
    ArticleMutator_DetailView
)

urlpatterns = [
    path("api-auth/", include("rest_framework.urls", namespace="rest_framework")),
    path("api-token-auth/", obtain_auth_token),

    path("subchannel/", include([
        path("", SubChannel_ListView.as_view(), name="subchannel"),
        path("<str:pk>/", SubChannel_DetailView.as_view(), name="subchannel-detail")
    ])),

    path("filter/", include([
        path("", Filter_ListView.as_view(), name="filter"),
        path("<str:pk>/", Filter_DetailView.as_view(), name="filter-detail")
    ])),

    path("subscription/", include([
        path("", Subscription_ListView.as_view(), name="subscription"),
        path("<str:pk>/", include([
            path("", Subscription_DetailView.as_view(), name="subscription-detail"),
            path("subchannels/", Subscription_SubChannelView.as_view(), name="subscription-channels")
        ]))
    ])),

    path("saved-guilds/", include([
        path("", SavedGuild_ListView.as_view(), name="saved-guilds"),
        path("<int:pk>/", SavedGuild_DetailView.as_view(), name="saved-guilds-detail")
    ])),

    path("tracked-content/", include([
        path("", TrackedContent_ListView.as_view(), name="tracked-content"),
        path("<path:pk>/", TrackedContent_DetailView.as_view(), name="tracked-content-detail")
    ])),

    path("article-mutator/", include([
        path("", ArticleMutator_ListView.as_view(), name="article-mutator"),
        path("<int:pk>/", ArticleMutator_DetailView.as_view(), name="article-mutator-detail")
    ])),
]
