from django.urls import path
from . import views

urlpatterns = [
    # ── Rooms ──
    path("rooms/",                           views.RoomListView.as_view(),              name="room-list"),
    path("rooms/<slug:slug>/feed/",          views.RoomFeedView.as_view(),              name="room-feed"),
    path("rooms/<slug:slug>/members/",       views.RoomMembersView.as_view(),           name="room-members"),
    path("rooms/<slug:slug>/manage/",        views.AdminRoomManageView.as_view(),       name="room-manage"),
    path("rooms/<slug:slug>/leave/",         views.LeaveRoomView.as_view(),             name="room-leave"),

    # ── Posts ──
    path("posts/<int:post_id>/",             views.PostDetailView.as_view(),            name="post-detail"),
    path("posts/<int:post_id>/react/",       views.PostReactionView.as_view(),          name="post-react"),
    path("posts/<int:post_id>/comments/",    views.PostCommentsView.as_view(),          name="post-comments"),

    # ── Comments ──
    path("comments/<int:comment_id>/",       views.CommentDeleteView.as_view(),         name="comment-delete"),
    path("comments/<int:comment_id>/react/", views.CommentReactionView.as_view(),       name="comment-react"),

    # ── Biashara ──
    path("biashara/",                        views.BiasharaListingListView.as_view(),   name="biashara-list"),
    path("biashara/<int:pk>/",               views.BiasharaListingDetailView.as_view(), name="biashara-detail"),

    # ── Deals ──
    path("deals/",                           views.DealListView.as_view(),              name="deal-list"),
    path("deals/<int:pk>/",                  views.DealDetailView.as_view(),            name="deal-detail"),

    # ── Kazi Jobs ──
    path("kazi/",                            views.KaziJobListView.as_view(),           name="kazi-list"),
    path("kazi/<int:pk>/",                   views.KaziJobDetailView.as_view(),         name="kazi-detail"),

    # ── Events ──
    path("events/",                          views.EventListView.as_view(),             name="event-list"),
    path("events/<int:pk>/",                 views.EventDetailView.as_view(),           name="event-detail"),
    path("events/<int:pk>/rsvp/",            views.EventRSVPView.as_view(),             name="event-rsvp"),

    # ── Lost & Found ──
    path("lostfound/",                       views.LostFoundListView.as_view(),         name="lostfound-list"),
    path("lostfound/<int:pk>/",              views.LostFoundDetailView.as_view(),       name="lostfound-detail"),


    # ── Business Profiles ──
    path("business/",                        views.BusinessProfileListView.as_view(),   name="business-list"),
    path("business/<slug:slug>/",            views.BusinessProfileDetailView.as_view(), name="business-detail"),
    path("business/<slug:slug>/follow/",     views.BusinessFollowView.as_view(),        name="business-follow"),
    path("business/<slug:slug>/posts/",      views.BusinessPostListView.as_view(),      name="business-posts"),
    path("business/<slug:slug>/posts/<int:pk>/", views.BusinessPostDetailView.as_view(),name="business-post-detail"),
    path("business/feed/",                   views.BusinessFeedView.as_view(),          name="business-feed"),
    path("business/<slug:slug>/services/",       views.BusinessServiceListView.as_view(),   name="business-service-list"),
    path("business/<slug:slug>/services/<int:pk>/", views.BusinessServiceDetailView.as_view(), name="business-service-detail"),
    path("business/<slug:slug>/followers/",      views.BusinessFollowersListView.as_view(),  name="business-followers"),

    # ── Campus ──
    path("campus/resources/",               views.CampusResourceListView.as_view(),    name="campus-resource-list"),
    path("campus/resources/<int:pk>/",      views.CampusResourceDetailView.as_view(),  name="campus-resource-detail"),
    path("campus/hostels/",                 views.HostelListView.as_view(),             name="campus-hostel-list"),
    path("campus/hostels/<int:pk>/",        views.HostelDetailView.as_view(),           name="campus-hostel-detail"),
    path("campus/attachments/",             views.AttachmentListView.as_view(),         name="campus-attachment-list"),
    path("campus/attachments/<int:pk>/",    views.AttachmentDetailView.as_view(),       name="campus-attachment-detail"),
]