from django.urls import path
from .views import (
    CategoryListView, 
    ProductListView, 
    ProductDetailView, 
    SpecialListProductView, 
    ProductSearchView, 
    CustomProductDetailView,
    CustomProductListView, 
    AddReviewView, 
    EditReviewView, 
    DeleteReviewView,
    AddToWishlistView,
    RemoveFromWishlistView,
    WishlistListView,
    AlsoBoughtView
)

urlpatterns = [
    path("categories/", CategoryListView.as_view(), name="category-list"),
    path("list/", ProductListView.as_view(), name="product-list"),
    path("special-list/", SpecialListProductView.as_view(), name="special-list"),
    path('product/<int:product_id>/', ProductDetailView.as_view(), name='product_detail'),
    path("search/", ProductSearchView.as_view(), name="product-search"),
    path('custom-products/', CustomProductListView.as_view(), name='custom_product_list'),
    path('custom-product/<int:product_id>/', CustomProductDetailView.as_view(), name='custom_product_detail'),
    path('product/<int:product_id>/review/', AddReviewView.as_view(), name='add_review'),
    path('review/<int:review_id>/', EditReviewView.as_view(), name='edit_review'),
    path('review/<int:review_id>/delete/', DeleteReviewView.as_view(), name='delete_review'),
    path('wishlist/add/<int:product_id>/', AddToWishlistView.as_view(), name='wishlist-add'),
    path('wishlist/remove/<int:product_id>/', RemoveFromWishlistView.as_view(), name='wishlist-remove'),
    path('wishlist/', WishlistListView.as_view(), name='wishlist-list'),
    path("people_also_bought/", AlsoBoughtView.as_view(), name = "also_bought")
]

