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 { FaqDataService } from './data/services/faq-data.service';
import { FaqReadService } from './data/services/faq-read.service';
import { FaqReadController } from './infrastructure/faq-read.controller';
import { FaqReadOrchestrator } from './domain/usecases/faq-read.orchestrator';
import { FaqDataController } from './infrastructure/faq-data.controller';
import { FaqDataOrchestrator } from './domain/usecases/faq-data.orchestrator';
import { CreateFaqManager } from './domain/usecases/managers/create-faq.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexFaqManager } from './domain/usecases/managers/index-faq.manager';
import { DeleteFaqManager } from './domain/usecases/managers/delete-faq.manager';
import { UpdateFaqManager } from './domain/usecases/managers/update-faq.manager';
import { ActiveFaqManager } from './domain/usecases/managers/active-faq.manager';
import { ConfirmFaqManager } from './domain/usecases/managers/confirm-faq.manager';
import { InactiveFaqManager } from './domain/usecases/managers/inactive-faq.manager';
import { DetailFaqManager } from './domain/usecases/managers/detail-faq.manager';
import { BatchDeleteFaqManager } from './domain/usecases/managers/batch-delete-faq.manager';
import { BatchActiveFaqManager } from './domain/usecases/managers/batch-active-faq.manager';
import { BatchConfirmFaqManager } from './domain/usecases/managers/batch-confirm-faq.manager';
import { BatchInactiveFaqManager } from './domain/usecases/managers/batch-inactive-faq.manager';
import { FaqModel } from './data/models/faq.model';
import { ChangePositionFaqManager } from './domain/usecases/managers/change-position-faq.manager';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([FaqModel], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [FaqDataController, FaqReadController],
  providers: [
    IndexFaqManager,
    DetailFaqManager,
    CreateFaqManager,
    DeleteFaqManager,
    UpdateFaqManager,
    ActiveFaqManager,
    ConfirmFaqManager,
    InactiveFaqManager,
    BatchDeleteFaqManager,
    BatchActiveFaqManager,
    BatchConfirmFaqManager,
    BatchInactiveFaqManager,
    ChangePositionFaqManager,

    FaqDataService,
    FaqReadService,

    FaqDataOrchestrator,
    FaqReadOrchestrator,
  ],
})
export class FaqModule {}
