const { addChat, getChatList, createGroupChat, changeGroupName, sendMessage, fetchMessages, updateChatStatus, getChatStatusByUserId, renameChatLog, deleteChatLog, exitGroup, toggleAdminStatus, removeMemberFromGroup, addMembersToGroup, readMessages, readChats, muteNotification, getNotificationStatus, updateUserAlertStatus, getUserAlertStatus, editMessage } = require("../controllers/chatController");


const chatRoutes = [
    {
        method : "POST",
        url : "/webservice/chat/add-chat",
        handler : addChat
    },
    {
        method : "POST",
        url : "/webservice/chat/update-read-status",
        handler : readChats
    },
    {
        method : "POST",
        url : "/webservice/chat/get-chat-list",
        handler : getChatList
    },
    {
        method: "POST",
        url: "/webservice/chat/create-group",
        handler: createGroupChat
    },
    {
        method: "POST",
        url: "/webservice/chat/change-group-name",
        handler: changeGroupName
    },
    {
        method: "POST",
        url: "/webservice/chat/send-message",
        handler: sendMessage
    },
    {
        method: "POST",
        url: "/webservice/chat/edit-message",
        handler: editMessage
    },
    {
        method: "POST",
        url: "/webservice/chat/fetch-messages",
        handler: fetchMessages
    },
    {
        method: "POST",
        url: "/webservice/chat/get-chat-status-by-userid",
        handler: getChatStatusByUserId
    },
    {
        method: "POST",
        url: "/webservice/chat/update-chat-status",
        handler: updateChatStatus
    },
    {
        method: "POST",
        url: "/webservice/chat/rename-chat-log",
        handler: renameChatLog
    },
    {
        method: "POST",
        url: "/webservice/chat/delete-chat-log",
        handler: deleteChatLog
    },
    {
        method: "POST",
        url: "/webservice/chat/exit-group",
        handler: exitGroup
    },
    {
        method: "POST",
        url: "/webservice/chat/toggle-admin-status",
        handler: toggleAdminStatus
    },
    {
        method: "POST",
        url: "/webservice/chat/add-members-to-group",
        handler: addMembersToGroup
    },
    {
        method: "POST",
        url: "/webservice/chat/remove-member-from-group",
        handler: removeMemberFromGroup
    },
    {
        method: "POST",
        url: "/webservice/chat/remove-unread-counts",
        handler: readMessages
    },
    {
        method: "POST",
        url: "/webservice/chat/mute-phone-notification",
        handler: muteNotification
    },
    {
        method: "POST",
        url: "/webservice/chat/get-notification-status",
        handler: getNotificationStatus
    },
    {
        method: "POST",
        url: "/webservice/chat/mute-alert",
        handler: updateUserAlertStatus
    },
    {
        method: "POST",
        url: "/webservice/chat/get-alert-status",
        handler: getUserAlertStatus
    },
];
 module.exports = chatRoutes;