from django.urls import path
from . import views
from django.contrib.auth import views as auth_views
from .views import CustomPasswordChangeView, CustomPasswordChangeDoneView

urlpatterns = [
    path("login/", views.login_view, name="login"),
    path("logout/", views.logout_view, name="logout"),

    path("password-reset/", auth_views.PasswordResetView.as_view(
        template_name="accounts/password_reset.html"), name="password_reset"),

    path("password-reset/done/", auth_views.PasswordResetDoneView.as_view(
        template_name="accounts/password_reset_done.html"), name="password_reset_done"),

    path("reset/<uidb64>/<token>/", auth_views.PasswordResetConfirmView.as_view(
        template_name="accounts/password_reset_confirm.html"), name="password_reset_confirm"),

    path("reset/done/", auth_views.PasswordResetCompleteView.as_view(
        template_name="accounts/password_reset_complete.html"), name="password_reset_complete"),

    path("password-change/", CustomPasswordChangeView.as_view(), name="password_change"),
    path("password-change/done/", CustomPasswordChangeDoneView.as_view(), name="password_change_done"),

    path("tenants/", views.tenant_list, name="tenant_list"),
    path("tenants/add/", views.tenant_create, name="tenant_add"),

    path("landlord/", views.landlord_dashboard, name="landlord_dashboard"),
    path("caretaker/", views.caretaker_dashboard, name="caretaker_dashboard"),
    path("tenant/", views.tenant_dashboard, name="tenant_dashboard"),

    path("caretakers/", views.caretaker_list, name="caretaker_list"),
    path("caretakers/add/", views.caretaker_create, name="caretaker_add"),
    path("caretakers/edit/<int:user_id>/", views.caretaker_update, name="caretaker_edit"),
    path("caretakers/delete/<int:user_id>/", views.caretaker_delete, name="caretaker_delete"),
    path("profile/", views.profile_view, name="profile"),
]