from django.urls import include, path
from rest_framework.routers import DefaultRouter
from . import customer_views, operator_views,views
from .views import get_num_message, closed_unread_ticket, get_unread_ticket_for_dashboard

router = DefaultRouter()
router.register('create_ticket', customer_views.CustomerTicketViewSet, basename='create_ticket')
router.register('respond', operator_views.OperatorTicketViewSet, basename='respond')
router.register(r'ticket', views.TicketSupportViewSet, basename='ticket')
router.register(r'message', views.MessageSupportViewSet, basename='message')
router.register(r'message-for-role', views.MessageForRoleViewSet, basename='message_for_role')
router.register(r'ticket-permission', views.TicketPermissionViewSet, basename='ticket-permission')
router.register(r'get-user-from-role', views.GetUserFromRoleViewSet, basename='get_user_from_role')
router.register(r'ticket-close-permission', views.TicketClosePermissionViewSet, basename='ticket-close-permission')


urlpatterns = [
    path('', include(router.urls)),
    path('get_num_message/', get_num_message),
    path('closed_unread_ticket/', closed_unread_ticket),
    path('get_unread_ticket_for_dashboard/', get_unread_ticket_for_dashboard),
]
