from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import (HotelViewSet, RoomTypeViewSet, HotelBookingViewSet, 
                    BookingInvoiceView, SyncPMSHotelView, SeasonalPricingViewSet,
                    AatithyaWebhookReceiverView)

router = DefaultRouter()
router.register("hotels", HotelViewSet)
router.register("room-types", RoomTypeViewSet)
router.register("seasonal-pricing", SeasonalPricingViewSet)
router.register("bookings", HotelBookingViewSet, basename="hotelbooking")

urlpatterns = [
    path("bookings/<int:pk>/invoice/", BookingInvoiceView.as_view(), name="booking-invoice"),
    path("sync-pms-hotel/", SyncPMSHotelView.as_view(), name="sync-pms-hotel"),
    path("webhook/aatithya/", AatithyaWebhookReceiverView.as_view(), name="aatithya-webhook"),
] + router.urls
