from django.urls import path
from .views import (
    ChatDetailView,
    ChatRoomListView,
    CreateOrderChatRoomView,
    CreateProductChatRoomView,
    FetchMessagesView,
    SendMessageView,
)

app_name = "chat"

urlpatterns = [
    path("", ChatRoomListView.as_view(), name="room-list"),
    path("<int:room_id>/", ChatDetailView.as_view(), name="chat-detail"),
    path("send-message/", SendMessageView.as_view(), name="send-message"),
    path("fetch-messages/<int:room_id>/", FetchMessagesView.as_view(), name="fetch-messages"),
    path("start/product/<int:product_id>/", CreateProductChatRoomView.as_view(), name="start-product-chat"),
    path("start/order/<int:order_id>/", CreateOrderChatRoomView.as_view(), name="start-order-chat"),
]
