from django.urls import path
from . import views

urlpatterns = [
    path('', views.index, name='index'),
    path('select-campaign/<int:tenant_id>/', views.select_campaign, name='select_campaign'),
    path('voters/', views.voter_list, name='voter_list'),
    path('voters/advanced-search/', views.voter_advanced_search, name='voter_advanced_search'),
    path('voters/export-csv/', views.export_voters_csv, name='export_voters_csv'),
    path('voters/bulk-sms/', views.bulk_send_sms, name='bulk_send_sms'),
    path('voters/bulk-email/', views.voter_bulk_send_email, name='voter_bulk_send_email'),
    path('voters/<int:voter_id>/', views.voter_detail, name='voter_detail'),
    path('voters/<int:voter_id>/edit/', views.voter_edit, name='voter_edit'),
    path('voters/<int:voter_id>/delete/', views.voter_delete, name='voter_delete'),
    path('voters/<int:voter_id>/geocode/', views.voter_geocode, name='voter_geocode'),
    path('voters/<int:voter_id>/schedule-call/', views.schedule_call, name='schedule_call'),
    path('voters/bulk-schedule-calls/', views.bulk_schedule_calls, name='bulk_schedule_calls'),
    
    path('voters/<int:voter_id>/interaction/add/', views.add_interaction, name='add_interaction'),
    path('interaction/<int:interaction_id>/edit/', views.edit_interaction, name='edit_interaction'),
    path('interaction/<int:interaction_id>/delete/', views.delete_interaction, name='delete_interaction'),
    
    path('voters/<int:voter_id>/donation/add/', views.add_donation, name='add_donation'),
    path('donation/<int:donation_id>/edit/', views.edit_donation, name='edit_donation'),
    path('donation/<int:donation_id>/delete/', views.delete_donation, name='delete_donation'),
    
    path('voters/<int:voter_id>/likelihood/add/', views.add_likelihood, name='add_likelihood'),
    path('likelihood/<int:likelihood_id>/edit/', views.edit_likelihood, name='edit_likelihood'),
    path('likelihood/<int:likelihood_id>/delete/', views.delete_likelihood, name='delete_likelihood'),
    
    path('voters/<int:voter_id>/event-participation/add/', views.add_event_participation, name='add_event_participation'),
    path('event-participation/<int:participation_id>/edit/', views.edit_event_participation, name='edit_event_participation'),
    path('event-participation/<int:participation_id>/delete/', views.delete_event_participation, name='delete_event_participation'),

    # Event Detail and Participant Management
    path('events/', views.event_list, name='event_list'),
    path('events/<int:event_id>/', views.event_detail, name='event_detail'),
    path('events/add/', views.event_create, name='event_create'),
    path('events/<int:event_id>/edit/', views.event_edit, name='event_edit'),
    path('events/<int:event_id>/participant/add/', views.event_add_participant, name='event_add_participant'),
    path('events/participant/<int:participation_id>/edit/', views.event_edit_participant, name='event_edit_participant'),
    path('events/participant/<int:participation_id>/delete/', views.event_delete_participant, name='event_delete_participant'),
    path('voters/search/json/', views.voter_search_json, name='voter_search_json'),
    path('events/<int:event_id>/import-participants/', views.import_participants, name='import_participants'),
    path('events/<int:event_id>/import-participants/map-fields/', views.import_participants_map_fields, name='import_participants_map_fields'),
    path('events/<int:event_id>/import-participants/process/', views.process_participants_import, name='process_participants_import'),
    path('events/<int:event_id>/import-participants/match/', views.match_participants, name='match_participants'),

    # Volunteer Management
    path('interests/add/', views.interest_add, name='interest_add'),
    path('interests/<int:interest_id>/delete/', views.interest_delete, name='interest_delete'),
    path('volunteers/', views.volunteer_list, name='volunteer_list'),
    path('volunteers/add/', views.volunteer_add, name='volunteer_add'),
    path('volunteers/<int:volunteer_id>/', views.volunteer_detail, name='volunteer_detail'),
    path('volunteers/<int:volunteer_id>/delete/', views.volunteer_delete, name='volunteer_delete'),
    path('volunteers/<int:volunteer_id>/assign-event/', views.volunteer_assign_event, name='volunteer_assign_event'),
    path('volunteers/assignment/<int:assignment_id>/remove/', views.volunteer_remove_event, name='volunteer_remove_event'),
    path('volunteers/search/json/', views.volunteer_search_json, name='volunteer_search_json'),
    path('volunteers/bulk-sms/', views.volunteer_bulk_send_sms, name='volunteer_bulk_send_sms'),
    path('volunteers/bulk-email/', views.volunteer_bulk_send_email, name='volunteer_bulk_send_email'),
    path('events/<int:event_id>/volunteer/add/', views.event_add_volunteer, name='event_add_volunteer'),
    path('events/volunteer/<int:assignment_id>/delete/', views.event_remove_volunteer, name='event_remove_volunteer'),

    # Door Visits
    path('door-visits/', views.door_visits, name='door_visits'),
    path('door-visits/log/', views.log_door_visit, name='log_door_visit'),
    path('door-visits/history/', views.door_visit_history, name='door_visit_history'),
    path('door-visits/neighborhoods/', views.neighborhood_counts, name='neighborhood_counts'),

    # Yard Signs
    path('yard-signs/', views.yard_sign_voters, name='yard_sign_voters'),

    # Call Queue
    path('call-queue/', views.call_queue, name='call_queue'),
    path('call-queue/<int:call_id>/complete/', views.complete_call, name='complete_call'),
    path('call-queue/<int:call_id>/delete/', views.delete_call, name='delete_call'),
    path('profile/', views.profile, name='profile'),
]