from django.urls import path
from . import views, auth_views

urlpatterns = [
    # Auth
    path('auth/register/', auth_views.register),
    path('auth/login/', auth_views.login),
    path('auth/refresh/', auth_views.refresh_token),
    path('auth/me/', auth_views.me),
    path('auth/me/update/', auth_views.update_profile),
    path('auth/me/password/', auth_views.change_password),
    path('auth/me/fcm-token/', auth_views.update_fcm_token),
    path('auth/delete-account/', auth_views.delete_account),

    # Conversations
    path('conversations/', views.conversations),
    path('conversations/<uuid:pk>/', views.conversation_detail),
    path('conversations/<uuid:pk>/messages/', views.conversation_messages),

    # File upload (R2)
    path('upload/', views.upload_file),

    # Documents
    path('documents/', views.documents),
    path('documents/<uuid:pk>/', views.document_detail),

    # Voice sessions
    path('voice/start-session/', views.voice_start_session),
    path('voice/end-session/', views.voice_end_session),
    path('voice/transcribe/', views.voice_transcribe),
    path('voice/sessions/', views.voice_sessions_list),

    # Rights cards
    path('rights-cards/', views.rights_cards),
    path('rights-cards/<uuid:pk>/', views.rights_card_detail),
    path('rights-cards/category/<str:category>/', views.rights_cards_by_category),

    # Glossary
    path('glossary/', views.glossary),
    path('glossary/search/', views.glossary_search),
    path('glossary/<str:term>/', views.glossary_term),

    # Bookmarks
    path('bookmarks/', views.bookmarks),
    path('bookmarks/<uuid:pk>/', views.bookmark_delete),

    # Reminders
    path('reminders/', views.reminders),
    path('reminders/<uuid:pk>/', views.reminder_detail),

    # Tools
    path('statute-check/', views.statute_check),
    path('cost-estimate/', views.cost_estimate),
    path('contract-draft/', views.contract_draft),
    path('law-search/', views.law_search),

    # Feedback
    path('feedback/<uuid:message_id>/', views.feedback),

    # Countries
    path('countries/', views.countries),
    path('countries/<str:code>/topics/', views.country_topics),

    # Stats
    path('stats/', views.stats),

    # TTS (Text-to-Speech)
    path('voice/tts/', views.voice_tts),

    # PDF Export
    path('export/pdf/<uuid:message_id>/', views.export_pdf),

    # Emergency Info
    path('emergency-info/', views.emergency_info),
]
