
"""Accounts App URL Configuration

This module defines URL patterns for the accounts application.
Provides routing for user management, role management, profile management,
and security functionality.

URL Patterns:
    - User CRUD operations
    - Role management
    - Profile management
    - Security monitoring
    - API endpoints for AJAX requests

Author: Focus Development Team
Version: 1.0.0
"""

from django.urls import path, include
from django.views.decorators.cache import cache_page
from apps.accounts import views

# App namespace for URL reversing
app_name = 'accounts'

# Main URL patterns for the accounts app
urlpatterns = [
    # User Management URLs
    path("", views.UserListView.as_view(), name="user_list"),
    path("list", views.UserListView.as_view(), name="user_list_alt"),
    path("create", views.UserCreateView.as_view(), name="user_create"),
    path("<uuid:user_id>", views.UserDetailView.as_view(), name="user_detail"),
    path("<uuid:user_id>/edit", views.UserUpdateView.as_view(), name="user_update"),
    path("<uuid:user_id>/delete", views.UserDeleteView.as_view(), name="user_delete"),
    
    # Role Management URLs
    path("roles", views.RoleListView.as_view(), name="role_list"),
    path("roles/list", views.RoleListView.as_view(), name="role_list_alt"),
    path("roles/create", views.RoleCreateView.as_view(), name="role_create"),
    path("roles/<uuid:pk>", views.RoleDetailView.as_view(), name="role_detail"),
    path("roles/<uuid:pk>/edit", views.RoleUpdateView.as_view(), name="role_update"),
    path("roles/<uuid:pk>/delete", views.RoleDeleteView.as_view(), name="role_delete"),
    
    # Profile Management URLs
    path("profiles", views.ProfileListView.as_view(), name="profile_list"),
    path("profiles/list", views.ProfileListView.as_view(), name="profile_list_alt"),
    path("profiles/create", views.ProfileCreateView.as_view(), name="profile_create"),
    path("profiles/<uuid:pk>", views.ProfileDetailView.as_view(), name="profile_detail"),
    path("profiles/<uuid:pk>/edit", views.ProfileUpdateView.as_view(), name="profile_update"),
    path("profiles/<uuid:pk>/delete", views.ProfileDeleteView.as_view(), name="profile_delete"),
    
    # Current User Profile URLs
    path("profile", views.CurrentUserProfileView.as_view(), name="current_profile"),
    path("profile/edit", views.CurrentUserProfileUpdateView.as_view(), name="current_profile_edit"),
    
    # User Security URLs
    path("<uuid:pk>/security", views.UserSecurityView.as_view(), name="user_security"),
    path("security/dashboard", views.SecurityDashboardView.as_view(), name="security_dashboard"),
    

]

