import { Module } from '@nestjs/common';
import {
  AccountSequenceGeneratorService,
  UserValidatorService,
} from './services';
import { UserAccountFactory } from './aggregates/user-account/user-account.factory';
import { USER_ACCOUNT_REPOSITORY } from './repositories/user-account.repository.interface';
import { UserAccountRepositoryImpl } from '@/infrastructure/persistence/repositories/user-account.repository.impl';
import { InfrastructureModule } from '@/infrastructure/infrastructure.module';

@Module({
  imports: [InfrastructureModule],
  providers: [
    { provide: USER_ACCOUNT_REPOSITORY, useClass: UserAccountRepositoryImpl },
    AccountSequenceGeneratorService,
    UserValidatorService,
    UserAccountFactory,
  ],
  exports: [
    USER_ACCOUNT_REPOSITORY,
    AccountSequenceGeneratorService,
    UserValidatorService,
    UserAccountFactory,
  ],
})
export class DomainModule {}
