from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    PublicationViewSet, PublicationCategoryViewSet, AuthorViewSet,
    SubmissionViewSet, ExternalPublicationViewSet, CSISPublicationViewSet,
)

router = DefaultRouter()
router.register(r"publications", PublicationViewSet, basename="publication")
router.register(r"publication-categories", PublicationCategoryViewSet, basename="publication-category")
router.register(r"authors", AuthorViewSet, basename="author")
router.register(r"submissions", SubmissionViewSet, basename="submission")
router.register(r"external-publications", ExternalPublicationViewSet, basename="external-publication")
router.register(r"csis-publications", CSISPublicationViewSet, basename="csis-publication")

urlpatterns = [
    path("", include(router.urls)),
]