from django.urls import path
from . import views

urlpatterns = [
    path('user/', views.home, name='home'),
    path('create_user/', views.create_user, name='create_user'),  # URL for creating user
    path('user_login/', views.user_login, name='user_login'),  # URL for login

    path('user/dashboard/<str:user_id>/', views.dashboard, name='dashboard'),
    path('new_job_postings/', views.new_job_posting, name='new_job_postings'),
    path('logout/', views.logout_view, name='logout'),
    path('save-job-posting/', views.save_job_posting, name='save_job_posting'),
    path('add_recruiter/', views.add_recruiter, name='add_recruiter'),
    path('create_recruiter/', views.create_recruiter, name='create_recruiter'),
    # path('send/<int:recipient_id>/', views.send_message, name='send_message'),
    # path('read/<int:message_id>/', views.mark_as_read, name='mark_as_read'),
    path('get_locations/', views.get_locations, name='get_locations'),
    path('get_client_details/', views.get_client_details, name='get_client_details'),
    path('new_job_posting/', views.new_job_posting, name='New_job_posting'),
    path('get_contacts/', views.get_contacts, name='get_contacts'),
    path('validate_field/', views.validate_field, name='validate_field'),
    path('all_job_postings/', views.all_job_postings, name='All_job_postings'),
    path('get_jobPosting/', views.get_jobPosting, name='get_jobPosting'),
    # path('messages/', views.message_list, name='message_list'),
    # path('messages/<int:message_id>/', views.message_detail, name='message_detail'),
    # path('messages/new/', views.new_message, name='new_message'),

    path('messages/', views.messages, name='messages'),
    path('send_message/', views.send_message, name='send_message'),
    path('update_message_read_status/<str:message_id>/', views.update_message_read_status,name='update_message_read_status'),
    path('unread_message_count/', views.unread_message_count, name='unread_message_count'),
    path('render_messages/', views.render_messages, name='render_messages'),
    path('render_sent_messages/', views.render_sent_messages, name='render_sent_messages'),
    path('send_reply/', views.send_reply, name='send_reply'),
    path('fetch_replies/<str:message_id>/', views.fetch_replies, name='fetch_replies'),
    path('render_trash_messages/', views.render_trash_messages, name='render_trash_messages'),
    path('track_download/<str:message_id>/', views.track_download, name='track_download'),
    path('fetch_download_timestamps/<str:message_id>/', views.fetch_download_timestamps,name='fetch_download_timestamps'),
    path('get_message_status/<str:message_id>/', views.get_message_status, name='get_message_status'),
    path('get_main_message_id/<str:message_id>/', views.get_main_message_id, name='get_main_message_id'),
]
