import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';
import { UserPrivilegeDataService } from './data/service/user-privilege-data.service';
import { UserPrivilegeReadService } from './data/service/user-privilege-read.service';
import { UserPrivilegeReadController } from './infrastructure/user-privilege-read.controller';
import { UserPrivilegeReadOrchestrator } from './domain/usecases/user-privilege/user-privilege-read.orchestrator';
import { UserPrivilegeDataController } from './infrastructure/user-privilege-data.controller';
import { UserPrivilegeDataOrchestrator } from './domain/usecases/user-privilege/user-privilege-data.orchestrator';
import { CreateUserPrivilegeManager } from './domain/usecases/user-privilege/managers/create-user-privilege.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexUserPrivilegeManager } from './domain/usecases/user-privilege/managers/index-user-privilege.manager';
import { DeleteUserPrivilegeManager } from './domain/usecases/user-privilege/managers/delete-user-privilege.manager';
import { UpdateUserPrivilegeManager } from './domain/usecases/user-privilege/managers/update-user-privilege.manager';
import { ActiveUserPrivilegeManager } from './domain/usecases/user-privilege/managers/active-user-privilege.manager';
import { ConfirmUserPrivilegeManager } from './domain/usecases/user-privilege/managers/confirm-user-privilege.manager';
import { InactiveUserPrivilegeManager } from './domain/usecases/user-privilege/managers/inactive-user-privilege.manager';
import { DetailUserPrivilegeManager } from './domain/usecases/user-privilege/managers/detail-user-privilege.manager';
import { BatchDeleteUserPrivilegeManager } from './domain/usecases/user-privilege/managers/batch-delete-user-privilege.manager';
import { BatchActiveUserPrivilegeManager } from './domain/usecases/user-privilege/managers/batch-active-user-privilege.manager';
import { BatchConfirmUserPrivilegeManager } from './domain/usecases/user-privilege/managers/batch-confirm-user-privilege.manager';
import { BatchInactiveUserPrivilegeManager } from './domain/usecases/user-privilege/managers/batch-inactive-user-privilege.manager';
import { UserPrivilegeConfigurationService } from './data/service/user-privilege-configuration.service';
import { UpdateUserPrivilegeConfigurationManager } from './domain/usecases/user-privilege-configuration/managers/update-user-privilege-configuration.manager';
import { UserPrivilegeConfigurationController } from './infrastructure/user-privilege-configuration.controller';
import { UserPrivilegeConfigurationDataOrchestrator } from './domain/usecases/user-privilege-configuration/user-privilege-configuration-data.orchestrator';
import { IndexUserPrivilegeConfigurationManager } from './domain/usecases/user-privilege-configuration/managers/index-user-privilege-configuration.manager';
import { UserPrivilegeModels } from './constants';
import { MenuUserPrivilegeConfigurationManager } from './domain/usecases/user-privilege-configuration/managers/menu-user-privilege-configuration.manager';
import { UserPrivilegeConfigUpdateHandler } from './domain/usecases/user-privilege-configuration/handlers/update-user-privilege-configuration.helper';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature(UserPrivilegeModels, CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [
    UserPrivilegeDataController,
    UserPrivilegeReadController,
    UserPrivilegeConfigurationController,
  ],
  providers: [
    UserPrivilegeConfigUpdateHandler,

    IndexUserPrivilegeManager,
    DetailUserPrivilegeManager,
    CreateUserPrivilegeManager,
    DeleteUserPrivilegeManager,
    UpdateUserPrivilegeManager,
    ActiveUserPrivilegeManager,
    ConfirmUserPrivilegeManager,
    InactiveUserPrivilegeManager,
    BatchDeleteUserPrivilegeManager,
    BatchActiveUserPrivilegeManager,
    BatchConfirmUserPrivilegeManager,
    BatchInactiveUserPrivilegeManager,

    IndexUserPrivilegeConfigurationManager,
    UpdateUserPrivilegeConfigurationManager,
    MenuUserPrivilegeConfigurationManager,

    UserPrivilegeDataService,
    UserPrivilegeReadService,
    UserPrivilegeConfigurationService,

    UserPrivilegeDataOrchestrator,
    UserPrivilegeReadOrchestrator,
    UserPrivilegeConfigurationDataOrchestrator,
  ],
})
export class UserPrivilegeModule {}
