from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView
from . import views

urlpatterns = [
    path('health/', views.health, name='health'),
    path('validate-code/', views.validate_code, name='validate_code'),
    path('register/', views.register, name='register'),
    path('login/', views.login, name='login'),
    path('logout/', views.logout, name='logout'),
    path('refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('me/', views.me, name='me'),
    # Therapist — invite codes
    path('codes/', views.codes, name='codes'),
    path('codes/<int:code_id>/', views.revoke_code, name='revoke_code'),
    path('patients/', views.patient_list, name='patient_list'),
    path('patients/<int:patient_id>/prescribe/', views.prescribe, name='prescribe'),
    path('patients/<int:patient_id>/logs/', views.patient_logs, name='patient_logs'),
    # Patient
    path('log/', views.log_exercise, name='log_exercise'),
    path('logs/', views.my_logs, name='my_logs'),
    path('prescription/', views.my_prescription, name='my_prescription'),
]
