from django.urls import path

from . import views

app_name = "products"

urlpatterns = [
    path("", views.ProductOverviewView.as_view(), name="overview"),
    path(
        "releases/<int:version_id>/<slug:asset>/download/",
        views.ReleaseAssetDownloadView.as_view(),
        name="release_asset_download",
    ),
    path(
        "<slug:main_slug>/videos/",
        views.ProductVideoArchiveView.as_view(),
        name="main_product_videos",
    ),
    path(
        "<slug:main_slug>/<slug:sub_slug>/videos/",
        views.ProductVideoArchiveView.as_view(),
        name="sub_product_videos",
    ),
    path(
        "<slug:main_slug>/",
        views.MainProductDetailView.as_view(),
        name="main_product_detail",
    ),
    path(
        "<slug:main_slug>/versions/",
        views.MainProductOlderVersionsView.as_view(),
        name="main_product_versions",
    ),
    path(
        "<slug:main_slug>/<slug:sub_slug>/versions/",
        views.SubProductOlderVersionsView.as_view(),
        name="sub_product_versions",
    ),
    path(
        "<slug:main_slug>/<slug:sub_slug>/",
        views.SubProductDetailView.as_view(),
        name="sub_product_detail",
    ),
]
