from django.urls import path
from ..views import (
    FaceProfileListCreateView, FaceProfileDetailView, FaceRecognitionView,
    RecognitionLogListView, UserProfileView, sync_faces, face_statistics,
    ObjectDetectionView, ObjectDetectionLogListView, object_detection_statistics,
    ImageAnalysisView
)

urlpatterns = [
    # Face profile management
    path('profiles/', FaceProfileListCreateView.as_view(), name='face-profile-list'),
    path('profiles/<int:pk>/', FaceProfileDetailView.as_view(), name='face-profile-detail'),
    
    # Face recognition
    path('recognize/', FaceRecognitionView.as_view(), name='face-recognize'),
    
    # Recognition logs
    path('logs/', RecognitionLogListView.as_view(), name='recognition-logs'),
    
    # Object detection
    path('objects/detect/', ObjectDetectionView.as_view(), name='object-detect'),
    path('objects/logs/', ObjectDetectionLogListView.as_view(), name='object-logs'),
    path('objects/statistics/', object_detection_statistics, name='object-statistics'),
    
    # Image analysis (motion detection + AI processing)
    path('analyze-image/', ImageAnalysisView.as_view(), name='image-analysis'),
    
    # User profile
    path('user-profile/', UserProfileView.as_view(), name='user-profile'),
    
    # Utility endpoints
    path('sync/', sync_faces, name='sync-faces'),
    path('statistics/', face_statistics, name='face-statistics'),
]
