from django.urls import path
from research import views

app_name = "research"

urlpatterns = [
    # Study management
    path("", views.study_list, name="study_list"),
    path("create/", views.study_create, name="study_create"),
    path("<int:pk>/", views.study_detail, name="study_detail"),
    path("<int:pk>/update/", views.study_update, name="study_update"),
    path("<int:pk>/arm/<int:arm_id>/", views.study_arm_update, name="study_arm_update"),
    
    # Exports
    path("<int:pk>/export.csv", views.study_export_csv, name="study_export_csv"),
    path("<int:pk>/export.json", views.study_export_json, name="study_export_json"),
    
    # Bulk generation
    path("<int:pk>/bulk-generate/", views.study_bulk_generate, name="study_bulk_generate"),
    
    # Public participant entry (no login required)
    path("run/<int:study_id>/<str:pseudo_id>/", views.participant_entry, name="participant_entry"),
]
