import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { PrismaService } from './persistence/prisma/prisma.service';
import { BackupShareRepositoryImpl } from './persistence/repositories/backup-share.repository.impl';
import { AuditLogRepository } from './persistence/repositories/audit-log.repository';
import { AesEncryptionService } from './crypto/aes-encryption.service';
import { BACKUP_SHARE_REPOSITORY } from '../domain';

@Module({
  imports: [ConfigModule],
  providers: [
    PrismaService,
    AuditLogRepository,
    AesEncryptionService,
    {
      provide: BACKUP_SHARE_REPOSITORY,
      useClass: BackupShareRepositoryImpl,
    },
  ],
  exports: [
    PrismaService,
    AuditLogRepository,
    AesEncryptionService,
    BACKUP_SHARE_REPOSITORY,
  ],
})
export class InfrastructureModule {}
