from django.urls import path
from django.contrib.auth import views as auth_views
from . import views

urlpatterns = [
    path("", views.home, name="home"),
    path("signup/", views.signup, name="signup"),
    path("activate/<uidb64>/<token>/", views.activate, name="activate"),
    path("resend-activation/", views.resend_activation, name="resend_activation"),
    path("dashboard/", views.dashboard, name="dashboard"),
    path("login/", auth_views.LoginView.as_view(template_name='core/login.html'), name="login"),
    path("logout/", views.logout_view, name="logout"),
    
    # Password Reset
    path("password-reset/", auth_views.PasswordResetView.as_view(
        template_name='core/password_reset_form.html',
        email_template_name='core/emails/password_reset_email.html',
        subject_template_name='core/emails/password_reset_subject.txt',
        success_url='/password-reset/done/'
    ), name="password_reset"),
    path("password-reset/done/", auth_views.PasswordResetDoneView.as_view(
        template_name='core/password_reset_done.html'
    ), name="password_reset_done"),
    path("password-reset-confirm/<uidb64>/<token>/", auth_views.PasswordResetConfirmView.as_view(
        template_name='core/password_reset_confirm.html',
        success_url='/password-reset-complete/'
    ), name="password_reset_confirm"),
    path("password-reset-complete/", auth_views.PasswordResetCompleteView.as_view(
        template_name='core/password_reset_complete.html'
    ), name="password_reset_complete"),
]