/*
 * Copyright (c) 2022.
 * Author Peter Placzek (tada5hi)
 * For the full copyright and license information,
 * view the LICENSE file that was distributed with this source code.
 */

import {Application} from "express";
import {attachControllers} from "@decorators/express";
import {AuthContactController} from "../../../app/auth/http/controllers/contact";
import {AuthContactDataController} from "../../../app/auth/http/controllers/contact-data";
import {AuthInvitationController} from "../../../app/auth/http/controllers/invitation";
import {AuthPermissionController} from "../../../app/auth/http/controllers/permission";
import {AuthRoleController} from "../../../app/auth/http/controllers/role";
import {AuthRolePermissionController} from "../../../app/auth/http/controllers/role-permission";
import {AuthTokenController} from "../../../app/auth/http/controllers/token";
import {AuthUserController} from "../../../app/auth/http/controllers/user";
import {AuthUserRoleController} from "../../../app/auth/http/controllers/user-role";
import {ChatChannelRoomController} from "../../../app/chat/http/controllers/chanel-room";
import {ChatContactRoomController} from "../../../app/chat/http/controllers/contact-room";
import {ChatGroupRoomController} from "../../../app/chat/http/controllers/group-room";
import {ChatMessageController} from "../../../app/chat/http/controllers/message";
import {ChatMessageStatusController} from "../../../app/chat/http/controllers/message-status";
import {ChatRoomController} from "../../../app/chat/http/controllers/room";
import {ChatRoomMemberController} from "../../../app/chat/http/controllers/room-member";
import {ChatRoomMemberContactController} from "../../../app/chat/http/controllers/room-member-contacts";

export function registerControllers(router: Application) {
    attachControllers(router, [
        // Auth Controllers
        AuthContactController,
        AuthContactDataController,
        AuthInvitationController,
        AuthPermissionController,
        AuthRoleController,
        AuthRolePermissionController,
        AuthTokenController,
        AuthUserController,
        AuthUserRoleController,

        // Chat Controllers
        ChatChannelRoomController,
        ChatContactRoomController,
        ChatGroupRoomController,
        ChatMessageController,
        ChatMessageStatusController,
        ChatRoomController,
        ChatRoomMemberController,
        ChatRoomMemberContactController
    ]);

    return router;
}
