import { forwardRef, Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BidsModule } from '../bids/bids.module';
import { ClientNotificationController } from './controllers/client-notification.controller';
import { NotificationController } from './controllers/notification.controller';
import { Notification } from './entities/notification.entity';
import { AdminNotificationListener } from './listeners/admin-notification.listener';
import { NotificationService } from './notification.service';
import { SendMessageHistoriesService } from '../bids/services/send-message-histories.service';
import { SendMessageHistory } from '../bids/entities/send-message-histories.entity';
import { MailsModule } from '../mails/mails.module';

@Module({
  imports: [
    forwardRef(() => BidsModule),
    TypeOrmModule.forFeature([Notification, SendMessageHistory]),
    MailsModule,
  ],
  controllers: [NotificationController, ClientNotificationController],
  providers: [NotificationService, AdminNotificationListener],
  exports: [NotificationService],
})
export class NotificationModule {}
