from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    EventViewSet, EventTemplateViewSet, InvitationTemplateViewSet, EventInvitationViewSet,
    EventTeamViewSet, EventSpeakerViewSet, EventScheduleItemViewSet,
    EventRegistrationViewSet, EventMediaViewSet, EventDocumentViewSet, EventLogViewSet,
    RegistrationFormViewSet, RegistrationFormFieldViewSet, RegistrationFormSubmissionViewSet,
    PublicRegistrationFormViewSet, EventBlocklistViewSet, EventSettingsView,
    OfficeCalendarEntryViewSet,
)

router = DefaultRouter()
router.register(r"events", EventViewSet, basename="event")
router.register(r"event-templates", EventTemplateViewSet, basename="event-template")
router.register(r"invitation-templates", InvitationTemplateViewSet, basename="invitation-template")
router.register(r"event-invitations", EventInvitationViewSet, basename="event-invitation")
router.register(r"event-teams", EventTeamViewSet, basename="event-team")
router.register(r"event-speakers", EventSpeakerViewSet, basename="event-speaker")
router.register(r"event-schedule-items", EventScheduleItemViewSet, basename="event-schedule-item")
router.register(r"event-registrations", EventRegistrationViewSet, basename="event-registration")
router.register(r"event-media", EventMediaViewSet, basename="event-media")
router.register(r"event-documents", EventDocumentViewSet, basename="event-document")
router.register(r"event-logs", EventLogViewSet, basename="event-log")
router.register(r"registration-forms", RegistrationFormViewSet, basename="registration-form")
router.register(r"registration-form-fields", RegistrationFormFieldViewSet, basename="registration-form-field")
router.register(r"registration-form-submissions", RegistrationFormSubmissionViewSet, basename="registration-form-submission")
router.register(r"public/registration-forms", PublicRegistrationFormViewSet, basename="public-registration-form")
router.register(r"event-blocklist", EventBlocklistViewSet, basename="event-blocklist")
router.register(r"office-calendar", OfficeCalendarEntryViewSet, basename="office-calendar")

urlpatterns = [
    path("event-settings/", EventSettingsView.as_view(), name="event-settings"),
    path("", include(router.urls)),
]
