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

app_name = "website"

urlpatterns = [
    path("staff/login/", views.staff_login, name="staff_login"),
    path('logout/', auth_views.LogoutView.as_view(next_page='website:home'), name='logout'),
    

    
    
    
    
    
    
    
    path("staff/performance/", views.staff_performance_dashboard, name="staff_performance_dashboard"),
path("staff/sla/", views.staff_sla_breaches, name="staff_sla_breaches"),
path("staff/api/auto-assign/", views.staff_auto_assign, name="staff_auto_assign"),
path("staff/queue/", views.staff_assignment_queue, name="staff_assignment_queue"),
path('staff/inbox/', views.staff_inbox, name='staff_inbox'),
path("staff/api/export/<str:module>/", views.staff_bulk_export, name="staff_bulk_export"),
path('staff/emr/patients/<int:patient_id>/timeline/', views.staff_patient_timeline, name='staff_patient_timeline'),
path("staff/api/live-counts/", views.staff_live_counts, name="staff_live_counts"),
    path("staff/api/bulk/<str:module>/", views.staff_bulk_action, name="staff_bulk_action"),
path("support/panel/preview/", views.support_panel_preview, name="support_panel_preview"),

    path('support/', views.support_ticket_create, name='support_ticket_create'),
    path('support/thanks/<str:public_id>/<str:secret>/', views.support_ticket_thanks, name='support_ticket_thanks'),
    path('support/t/<str:public_id>/<str:secret>/', views.support_ticket_view, name='support_ticket_view'),
    path('staff/support/', views.staff_support_dashboard, name='staff_support_dashboard'),
    path('staff/support-analytics/', views.staff_support_analytics, name='staff_support_analytics'),
    path('staff/notifications/poll/', views.staff_notifications_poll, name='staff_notifications_poll'),
    path('staff/notifications/mark-read/', views.staff_notifications_mark_read, name='staff_notifications_mark_read'),
    path('staff/support/<str:public_id>/', views.staff_support_ticket, name='staff_support_ticket'),
    path('staff/support/<str:public_id>/quick/', views.staff_support_ticket_quick_action, name='staff_support_ticket_quick_action'),
    path('offline/', views.offline, name='offline'),
    path('request-care/', views.care_request_step1, name='care_request_step1'),
    path('request-care/step-2/', views.care_request_step2, name='care_request_step2'),
    path('request-care/step-3/', views.care_request_step3, name='care_request_step3'),
    path('request-care/review/', views.care_request_review, name='care_request_review'),
    path('request-care/success/', views.care_request_success, name='care_request_success'),
    path('telehealth/book/', views.telehealth_booking, name='telehealth_booking'),
    path('telehealth/slots/', views.telehealth_slots_api, name='telehealth_slots_api'),
    path('telehealth/book/success/', views.telehealth_booking_success, name='telehealth_booking_success'),
    path('paystack/telehealth/start/<int:booking_id>/', views.paystack_start_telehealth, name='paystack_start_telehealth'),
    path('paystack/callback/', views.paystack_callback, name='paystack_callback'),

    path('staff/', views.staff_dashboard, name='staff_dashboard'),
    path('staff/emr/', include(('emr.staff_urls','emr'), namespace='emr')),

    path('staff/bookings/', views.staff_telehealth_booking_list, name='staff_telehealth_booking_list'),
    path('staff/bookings/<int:booking_id>/', views.staff_telehealth_booking_detail, name='staff_telehealth_booking_detail'),
    path('staff/bookings/<int:booking_id>/quick/', views.staff_booking_quick_action, name='staff_booking_quick_action'),
    path('staff/providers/', views.staff_provider_list, name='staff_provider_list'),
    path('staff/providers/new/', views.staff_provider_create, name='staff_provider_create'),
    path('staff/providers/<int:provider_id>/edit/', views.staff_provider_edit, name='staff_provider_edit'),
    path('staff/providers/<int:provider_id>/approval/', views.staff_provider_approval, name='staff_provider_approval'),
    path('staff/slots/', views.staff_slot_list, name='staff_slot_list'),
    path('staff/slots/new/', views.staff_slot_create, name='staff_slot_create'),
    path('staff/slots/<int:slot_id>/edit/', views.staff_slot_edit, name='staff_slot_edit'),
    path('staff/slots/<int:slot_id>/delete/', views.staff_slot_delete, name='staff_slot_delete'),
    path('staff/slots/bulk-generate/', views.staff_slot_bulk_generate, name='staff_slot_bulk_generate'),

    path('staff/care/requests/', views.staff_care_request_list, name='staff_care_request_list'),
    path('staff/care/requests/<int:request_id>/', views.staff_care_request_detail, name='staff_care_request_detail'),
    path('staff/care/requests/<int:request_id>/quick/', views.staff_care_request_quick_action, name='staff_care_request_quick_action'),

    path('staff/care/applications/', views.staff_career_application_list, name='staff_career_application_list'),
    path('staff/care/applications/<int:application_id>/', views.staff_career_application_detail, name='staff_career_application_detail'),

    path('staff/payments/', views.staff_payment_list, name='staff_payment_list'),
    path('staff/payments/<int:tx_id>/', views.staff_payment_detail, name='staff_payment_detail'),

    path('staff/users/', views.staff_user_list, name='staff_user_list'),
    path('staff/users/new/', views.staff_user_create, name='staff_user_create'),
    path('staff/users/<int:user_id>/edit/', views.staff_user_edit, name='staff_user_edit'),
    # Staff UI - Content CRUD
    path('staff/services/', views.staff_service_list, name='staff_service_list'),
    path('staff/services/new/', views.staff_service_create, name='staff_service_create'),
    path('staff/services/<int:service_id>/edit/', views.staff_service_edit, name='staff_service_edit'),
    path('staff/services/<int:service_id>/delete/', views.staff_service_delete, name='staff_service_delete'),

    path('staff/blog/', views.staff_blog_list, name='staff_blog_list'),
    path('staff/blog/new/', views.staff_blog_create, name='staff_blog_create'),
    path('staff/blog/<int:post_id>/edit/', views.staff_blog_edit, name='staff_blog_edit'),
    path('staff/blog/<int:post_id>/delete/', views.staff_blog_delete, name='staff_blog_delete'),

    path('staff/positions/', views.staff_position_list, name='staff_position_list'),
    path('staff/positions/new/', views.staff_position_create, name='staff_position_create'),
    path('staff/positions/<int:position_id>/edit/', views.staff_position_edit, name='staff_position_edit'),
    path('staff/positions/<int:position_id>/delete/', views.staff_position_delete, name='staff_position_delete'),
    path('staff/care/', views.staff_care_dashboard, name='staff_care_dashboard'),
    path('staff/care/assign/', views.staff_assignment_create, name='staff_assignment_create'),
    path('caregiver/portal/', views.caregiver_portal, name='caregiver_portal'),
    path('whatsapp/webhook/', views.whatsapp_webhook, name='whatsapp_webhook'),

    path("", views.home, name="home"),
    path("about/", views.about, name="about"),
    path("services/", views.services, name="services"),
    path("care-process/", views.care_process, name="care_process"),
    path("why-choose-us/", views.why_choose_us, name="why_choose_us"),
    path("testimonials/", views.testimonials, name="testimonials"),

    path("careers/", views.careers, name="careers"),
    path("careers/success/", views.careers_success, name="careers_success"),

    path("contact/", views.contact, name="contact"),
    path("contact/success/", views.contact_success, name="contact_success"),

    path("blog/", views.BlogListView.as_view(), name="blog_list"),
    path("blog/<slug:slug>/", views.BlogDetailView.as_view(), name="blog_detail"),

    path("privacy/", views.legal_privacy, name="legal_privacy"),
    path("terms/", views.legal_terms, name="legal_terms"),
    path("disclaimer/", views.legal_disclaimer, name="legal_disclaimer"),
]