import { Conversation } from '@/entities/conversation.entity';
import { Message } from '@/entities/message.entity';
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MessagesEventService } from './messages-event.service';
import { MessagesController } from './messages.controller';
import { MessagesGateway } from './messages.gateway';
import { MessagesService } from './messages.service';
import { MessagesListener } from './messages.listener';
import { ZulipService } from './zulip.service';
import { HttpModule } from '@nestjs/axios';
import { Log } from '@/entities/log.entity';
import { LogsService } from './logs.service';
import { MailerModule } from '../mailer/mailer.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([Message, Conversation, Log]),
    HttpModule,
    MailerModule,
  ],
  providers: [
    MessagesService,
    MessagesGateway,
    MessagesEventService,
    MessagesListener,
    ZulipService,
    LogsService,
  ],
  controllers: [MessagesController],
  exports: [MessagesGateway, MessagesService, MessagesEventService],
})
export class MessagesModule {}
