from django.urls import path
from django.conf.urls import url, include
from rest_framework_simplejwt import views as jwt_views
from . import views

app_name = "accounts"
urlpatterns = [
    path(
        "create/newsletter/",
        views.NewsletterCreateView.as_view(),
        name="create-newsletter-sub",
    ),
    path(
        "list/customers/",
        views.CustomerListView.as_view(),
        name="list-customers",
    ),
    path(
        "list/pending-vendors/",
        views.PendingVendorListView.as_view(),
        name="list-pending-vendors",
    ),
    path(
        "list/vendors/",
        views.VendorListView.as_view(),
        name="list-vendors",
    ),
    path(
        "list/subscribers/",
        views.SubscriberListView.as_view(),
        name="list-subscribers",
    ),
    path(
        "customer/<uuid:pk>/",
        views.CustomerDetailView.as_view(),
        name="customer-detail",
    ),
    path(
        "vendor/<uuid:pk>/",
        views.VendorDetailView.as_view(),
        name="vendor-detail",
    ),
    path(
        "subscriber/<uuid:pk>/",
        views.SubscriberDetailView.as_view(),
        name="subscriber-detail",
    ),
    path(
        "register/customer/",
        views.CustomerRegistrationView.as_view(),
        name="vendor-register",
    ),
    path(
        "register/vendor/",
        views.VendorRegistrationView.as_view(),
        name="vendor-register",
    ),
    path(
        "customer-verify/",
        views.CustomerEmailVerificationView.as_view(),
        name="customer-verify",
    ),
    path(
        "subscribers/count/",
        views.SubscriberCountView.as_view(),
        name="count-subscribers",
    ),
    path(
        "token/",
        jwt_views.TokenObtainPairView.as_view(),
        name="token-obtain-pair",
    ),
    path(
        "token/refresh/",
        jwt_views.TokenRefreshView.as_view(),
        name="token-refresh",
    ),
    path(
        "login/customer/",
        views.CustomerLoginView.as_view(),
        name="login-customer",
    ),
    path(
        "login/vendor/",
        views.VendorLoginView.as_view(),
        name="login-vendor",
    ),
    path(
        "logout/",
        views.UserLogoutView.as_view(),
        name="logout",
    ),
    path(
        "password-reset/",
        include(
            "django_rest_passwordreset.urls",
            namespace="password-reset",
        ),
    ),
    path(
        "contact/",
        views.ContactFormView.as_view(),
        name="contact",
    ),
    path(
        "count/customers/",
        views.CustomerCountView.as_view(),
        name="count-customers",
    ),
    path(
        "count/vendors/",
        views.VendorCountView.as_view(),
        name="count-vendor",
    ),
]
