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

from .views import ContactMePublicView, ContactMeAdminViewSet, trigger_weekly_email

router = DefaultRouter()
router.register(r"contact-messages", ContactMeAdminViewSet, basename="contactme")

urlpatterns = [
    # Public endpoint
    path("contact-me/", ContactMePublicView.as_view(), name="contact-me"),

    # Admin endpoints
    path("", include(router.urls)),
    path("trigger-weekly-email/", trigger_weekly_email, name="trigger-weekly-email"),
]
