# ============================================================
# ADDITIVE: Communication & Collaboration - Employee app URLs
# Mounted from hrnexus/urls.py as  path('employee/communication/', include('Communication.self_urls'))
# ============================================================
from django.urls import path
from rest_framework.routers import SimpleRouter

from . import views_calendar as cal
from . import views_chat_self as c
from . import views_self as s

router = SimpleRouter()
router.register(r"meetings", s.MyMeetingsViewSet, basename="emp-comm-meetings")
router.register(r"home", s.HomeViewSet, basename="emp-comm-home")

urlpatterns = [
    path("chat/summary/", c.ChatSummary.as_view()),
    path("chat/conversations/", c.Conversations.as_view()),
    path("chat/people/", c.People.as_view()),
    path("chat/presence/", c.PresenceView.as_view()),
    path("chat/search/", c.ChatSearch.as_view()),
    path("chat/direct/start/", c.DirectStart.as_view()),
    path("chat/direct/<str:code>/messages/", c.DirectMessages.as_view()),
    path("chat/direct/<str:code>/read/", c.DirectRead.as_view()),
    path("chat/direct/<str:code>/mute/", c.DirectMute.as_view()),
    path("chat/messages/direct/<int:pk>/", c.DirectMessageDetail.as_view()),
    path("chat/messages/direct/<int:pk>/update/", c.DirectMessageUpdatePost.as_view()),
    path("chat/messages/direct/<int:pk>/delete/", c.DirectMessageDeletePost.as_view()),
    path("chat/channels/", c.Channels.as_view()),
    path("chat/channels/browse/", c.ChannelBrowse.as_view()),
    path("chat/channels/<int:pk>/", c.ChannelDetail.as_view()),
    path("chat/channels/<int:pk>/update/", c.ChannelUpdatePost.as_view()),
    path("chat/channels/<int:pk>/delete/", c.ChannelDeletePost.as_view()),
    path("chat/channels/<int:pk>/join/", c.ChannelJoin.as_view()),
    path("chat/channels/<int:pk>/leave/", c.ChannelLeave.as_view()),
    path("chat/channels/<int:pk>/read/", c.ChannelRead.as_view()),
    path("chat/channels/<int:pk>/mute/", c.ChannelMute.as_view()),
    path("chat/channels/<int:pk>/members/", c.ChannelMembers.as_view()),
    path("chat/channels/<int:pk>/members/<str:code>/", c.ChannelMemberDetail.as_view()),
    path("chat/channels/<int:pk>/members/<str:code>/remove/", c.ChannelMemberRemovePost.as_view()),
    path("chat/channels/<int:pk>/messages/", c.ChannelMessages.as_view()),
    path("chat/messages/channel/<int:pk>/", c.ChannelMessageDetail.as_view()),
    path("chat/messages/channel/<int:pk>/update/", c.ChannelMessageUpdatePost.as_view()),
    path("chat/messages/channel/<int:pk>/delete/", c.ChannelMessageDeletePost.as_view()),
    path("chat/attachments/<int:pk>/download/", c.AttachmentDownload.as_view()),
    path("calendar/", cal.CalendarSelfView.as_view()),
] + router.urls
