from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView

from .views import buyer_dashboard, dashboard_redirect, home, product_detail, seller_dashboard

urlpatterns = [
    path("", home, name="home"),
    path("product/<int:pk>/", product_detail, name="product_detail"),
    path("login/", LoginView.as_view(template_name="core/login.html"), name="login"),
    path("logout/", LogoutView.as_view(next_page="home"), name="logout"),
    path("dashboard/", dashboard_redirect, name="dashboard"),
    path("dashboard/buyer/", buyer_dashboard, name="buyer_dashboard"),
    path("dashboard/seller/", seller_dashboard, name="seller_dashboard"),
]