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 { PaymentMethodDataService } from './data/services/payment-method-data.service';
import { PaymentMethodReadService } from './data/services/payment-method-read.service';
import { PaymentMethodReadController } from './infrastructure/payment-method-read.controller';
import { PaymentMethodReadOrchestrator } from './domain/usecases/payment-method-read.orchestrator';
import { PaymentMethodDataController } from './infrastructure/payment-method-data.controller';
import { PaymentMethodDataOrchestrator } from './domain/usecases/payment-method-data.orchestrator';
import { CreatePaymentMethodManager } from './domain/usecases/managers/create-payment-method.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { IndexPaymentMethodManager } from './domain/usecases/managers/index-payment-method.manager';
import { DeletePaymentMethodManager } from './domain/usecases/managers/delete-payment-method.manager';
import { UpdatePaymentMethodManager } from './domain/usecases/managers/update-payment-method.manager';
import { ActivePaymentMethodManager } from './domain/usecases/managers/active-payment-method.manager';
import { ConfirmPaymentMethodManager } from './domain/usecases/managers/confirm-payment-method.manager';
import { InactivePaymentMethodManager } from './domain/usecases/managers/inactive-payment-method.manager';
import { DetailPaymentMethodManager } from './domain/usecases/managers/detail-payment-method.manager';
import { BatchDeletePaymentMethodManager } from './domain/usecases/managers/batch-delete-payment-method.manager';
import { BatchActivePaymentMethodManager } from './domain/usecases/managers/batch-active-payment-method.manager';
import { BatchConfirmPaymentMethodManager } from './domain/usecases/managers/batch-confirm-payment-method.manager';
import { BatchInactivePaymentMethodManager } from './domain/usecases/managers/batch-inactive-payment-method.manager';
import { PaymentMethodModel } from './data/models/payment-method.model';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([PaymentMethodModel], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [PaymentMethodDataController, PaymentMethodReadController],
  providers: [
    IndexPaymentMethodManager,
    DetailPaymentMethodManager,
    CreatePaymentMethodManager,
    DeletePaymentMethodManager,
    UpdatePaymentMethodManager,
    ActivePaymentMethodManager,
    ConfirmPaymentMethodManager,
    InactivePaymentMethodManager,
    BatchDeletePaymentMethodManager,
    BatchActivePaymentMethodManager,
    BatchConfirmPaymentMethodManager,
    BatchInactivePaymentMethodManager,

    PaymentMethodDataService,
    PaymentMethodReadService,

    PaymentMethodDataOrchestrator,
    PaymentMethodReadOrchestrator,
  ],
})
export class PaymentMethodModule {}
