from django.urls import path
from . import views
from .views import RentalOwnerLoginView
from django.conf import settings
from django.conf.urls.static import static

app_name = 'rental_app'

urlpatterns = [
    path('', views.home_rental, name='home_rental'),
    path('about-ensolanka/', views.about_us_rent, name='about_us_rent'),
    path('terms-and-conditions/', views.terms_page, name='terms_page'),
    path('faq/', views.faq_page, name='faq_page'),
    path('privacy-policy/', views.privacy_policy_page, name='privacy_policy_page'),
    path(
        'refund-payment-policy/',
        views.refund_payment_policy_page,
        name='refund_payment_policy_page'
    ),
    path('disclaimer/', views.disclaimer_page, name='disclaimer_page'),
    path(
        'cookie-policy/',
        views.cookie_policy_page,
        name='cookie_policy_page'
    ),
    path('contact/', views.contact_page, name='contact_page'),
    path('success/', views.success_page, name='success_page'),

    path(
        'information-center/',
        views.rental_partner_information_center,
        name='rental_partner_information_center'
    ),
    path('owner-signup/', views.rental_owner_signup, name='rental_owner_signup'),
    path('owner-login/', views.RentalOwnerLoginView.as_view(), name='rental_owner_login'),
    path('password-reset/', views.RentalOwnerPasswordResetView.as_view(), name='rental_password_reset'),
    path('password-reset/done/', views.RentalOwnerPasswordResetDoneView.as_view(), name='rental_password_reset_done'),
    path('reset/<uidb64>/<token>/', views.RentalOwnerPasswordResetConfirmView.as_view(), name='rental_password_reset_confirm'),
    path('reset/done/', views.RentalOwnerPasswordResetCompleteView.as_view(), name='rental_password_reset_complete'),
    path('owner-dashboard/', views.rental_owner_dashboard, name='rental_owner_dashboard'),

    path('profile/', views.rental_owner_profile_page, name='rental_owner_profile_page'),
    path('profile/edit/', views.edit_rental_owner_profile, name='edit_rental_owner_profile'),
    path('profile/upload-image/', views.upload_rental_owner_profile_image, name='upload_rental_owner_profile_image'),
    path('profile/change-username/', views.change_rental_owner_username, name='change_rental_owner_username'),
    path('profile/change-password/', views.change_rental_owner_password, name='change_rental_owner_password'),

    path('listings/create/', views.rental_listing_create, name='rental_listing_create'),
    path('listings/<slug:slug>/edit/', views.rental_listing_edit, name='rental_listing_edit'),
    path('listings/<slug:slug>/', views.rental_owner_listing_detail, name='rental_owner_listing_detail'),
    path('listings/images/<int:image_id>/delete/', views.delete_rental_listing_image, name='delete_rental_listing_image'),

    path('public/list/', views.public_rental_list, name='public_rental_list'),
    path('private/', views.private_rental_list, name='private_rental_list'),

    path(
        'owner-dashboard/interested-foreigners/',
        views.interested_foreigners_list,
        name='interested_foreigners_list'
    ),
    path('owner/payment-center/', views.rental_owner_payment_center, name='rental_owner_payment_center'),
    
    path('owner/payment-checkout/', views.rental_owner_payment_checkout, name='rental_owner_payment_checkout'),
    path('owner/payment-checkout/pay/', views.rental_owner_payment_checkout_pay, name='rental_owner_payment_checkout_pay'),
    path('owner/start-stripe/', views.start_rental_owner_stripe_checkout, name='start_rental_owner_stripe_checkout'),
    path('owner/start-paypal/', views.start_rental_owner_paypal_checkout, name='start_rental_owner_paypal_checkout'),

    path(
        'owner/stripe-payment-success/<int:transaction_id>/',
        views.rental_owner_stripe_payment_success,
        name='rental_owner_stripe_payment_success'
    ),

    path(
        'owner/paypal-payment-success/<int:transaction_id>/',
        views.rental_owner_paypal_payment_success,
        name='rental_owner_paypal_payment_success'
    ),
    
    path(
        'owner/payment-success/<int:transaction_id>/',
        views.rental_owner_payment_success,
        name='rental_owner_payment_success'
    ),

    path(
        'owner/payment-cancelled/<int:transaction_id>/',
        views.rental_owner_payment_cancelled,
        name='rental_owner_payment_cancelled'
    ),

    path(
        'owner/payment-failed/<int:transaction_id>/',
        views.rental_owner_payment_failed,
        name='rental_owner_payment_failed'
    ),
    #wallet top up:
    path(
        'owner/wallet/top-up/',
        views.rental_owner_wallet_topup,
        name='rental_owner_wallet_topup'
    ),

    path(
        'owner/wallet/topup/start-stripe/',
        views.start_rental_owner_wallet_topup_stripe_checkout,
        name='start_rental_owner_wallet_topup_stripe_checkout'
    ),

    path(
        'owner/wallet/topup/start-paypal/',
        views.start_rental_owner_wallet_topup_paypal_checkout,
        name='start_rental_owner_wallet_topup_paypal_checkout'
    ),

    path(
        'owner/wallet-topup/stripe-success/<int:transaction_id>/',
        views.rental_owner_wallet_topup_stripe_success,
        name='rental_owner_wallet_topup_stripe_success'
    ),

    path(
        'owner/wallet-topup/paypal-success/<int:transaction_id>/',
        views.rental_owner_wallet_topup_paypal_success,
        name='rental_owner_wallet_topup_paypal_success'
    ),

    path(
        'owner/wallet-topup/cancelled/<int:transaction_id>/',
        views.rental_owner_wallet_topup_cancelled,
        name='rental_owner_wallet_topup_cancelled'
    ),

    path(
        'owner/wallet-topup/failed/<int:transaction_id>/',
        views.rental_owner_wallet_topup_failed,
        name='rental_owner_wallet_topup_failed'
    ),
    path('owner/banking-details/', views.rental_owner_banking_details, name='rental_owner_banking_details'),
    path(
        'account/activate-property-care/',
        views.activate_property_manager_from_rental_owner,
        name='activate_property_manager_from_rental_owner'
    ),
    path(
        'account/activate-affiliate/',
        views.activate_affiliate_from_rental_owner,
        name='activate_affiliate_from_rental_owner'
    ),
    
    path('<slug:slug>/notify-interest/', views.notify_rental_interest, name='notify_rental_interest'),
    path('<slug:slug>/', views.rental_detail, name='rental_detail'),

]
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)