import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CsvBookingsController } from './controllers/csv-bookings.controller';
import { CsvBookingService } from './services/csv-booking.service';
import { CsvBookingOrmEntity } from '../infrastructure/persistence/typeorm/entities/csv-booking.orm-entity';
import { TypeOrmCsvBookingRepository } from '../infrastructure/persistence/typeorm/repositories/csv-booking.repository';
import { NotificationsModule } from './notifications/notifications.module';
import { EmailModule } from '../infrastructure/email/email.module';
import { StorageModule } from '../infrastructure/storage/storage.module';

/**
 * CSV Bookings Module
 *
 * Handles CSV-based booking workflow with carrier email confirmations
 */
@Module({
  imports: [
    TypeOrmModule.forFeature([CsvBookingOrmEntity]),
    NotificationsModule, // Import NotificationsModule to access NotificationRepository
    EmailModule,
    StorageModule,
  ],
  controllers: [CsvBookingsController],
  providers: [CsvBookingService, TypeOrmCsvBookingRepository],
  exports: [CsvBookingService],
})
export class CsvBookingsModule {}
