"""
URL patterns for users app.
"""
from django.urls import path
from . import views

urlpatterns = [
    # Authentication
    path('register/', views.UserRegistrationView.as_view(), name='user_register'),
    path('login/', views.login_view, name='user_login'),
    path('refresh/', views.refresh_token_view, name='refresh_token'),
    path('logout/', views.logout_view, name='user_logout'),
    path('user/', views.get_current_user, name='get_current_user'),
    
    # User management
    path('profile/', views.UserProfileView.as_view(), name='user_profile'),
    path('update/', views.UserUpdateView.as_view(), name='user_update'),
    path('change-password/', views.change_password_view, name='change_password'),
    path('profile-detail/', views.UserProfileDetailView.as_view(), name='user_profile_detail'),
    
    # API Key management
    path('api-keys/', views.APIKeyListView.as_view(), name='api_key_list'),
    path('api-keys/<int:pk>/', views.APIKeyDetailView.as_view(), name='api_key_detail'),
    path('regenerate-api-key/', views.regenerate_api_key_view, name='regenerate_api_key'),
    path('toggle-api-access/', views.toggle_api_access_view, name='toggle_api_access'),
    
    # Admin functions
    path('update-subscription/', views.update_subscription_view, name='update_subscription'),
    path('list/', views.UserListView.as_view(), name='user_list'),
]

