from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import collection_views
from . import api_views

router = DefaultRouter(trailing_slash=False)
router.register('collections', api_views.ImageCollectionViewSet)
router.register('images', api_views.ImageViewSet)

urlpatterns = [
    # Collection URLs
    path('ui/collections/', collection_views.CollectionListView.as_view(), name='collection-list'),
    path('ui/collections/new/', collection_views.CollectionCreateView.as_view(), name='collection-create'),
    path('ui/collections/<uuid:pk>/', collection_views.CollectionDetailView.as_view(), name='collection-detail'),
    path('ui/collections/<uuid:pk>/edit/', collection_views.CollectionUpdateView.as_view(), name='collection-update'),
    path('ui/collections/<uuid:pk>/delete/', collection_views.CollectionDeleteView.as_view(), name='collection-delete'),

    # Include collection API URLs
    path('api/', include(router.urls)),
]
