import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MongooseModule } from '@nestjs/mongoose';
import { GuestsModule } from './guests/guests.module';
import { QuizModule } from './quiz/quiz.module';
import { SocketGateway } from './socket/socket.gateway';
import { SharedModule } from './shared/shared.module';
import { StateModule } from './state/state.module';
import { ScheduleModule } from '@nestjs/schedule';
import { SchedulerService } from './scheduler/scheduler.service';
import { GameModule } from './game/game.module';
import { CqrsModule } from '@nestjs/cqrs';
import { SocketHandlersModule } from './socket/socket-handlers/socket-handlers.module';
import { CardsModule } from './cards/cards.module';
import { PenaltyModule } from './penalty/penalty.module';
import { VoiceModule } from './voice/voice.module';
import { GiftsModule } from './gifts/gifts.module';
import {ConfigModule} from "@nestjs/config";
import {MessagingModule} from "./messaging/messaging.module";
import * as process from "process";
import {OpenaiModule} from "./openai/openai.module";
import { FeatureflagController } from './featureflag/featureflag.controller';
import { FeatureflagService } from './featureflag/featureflag.service';

@Module({
  imports: [
    ConfigModule.forRoot(),
    MessagingModule,
    MongooseModule.forRoot(process.env.MONGO_URL),
    MessagingModule,
    GuestsModule,
    QuizModule,
    SharedModule,
    ScheduleModule.forRoot(),
    StateModule,
    GameModule,
    CqrsModule,
    SocketHandlersModule,
    CardsModule,
    PenaltyModule,
    VoiceModule,
    GiftsModule,
    OpenaiModule
  ],
  controllers: [AppController, FeatureflagController],
  providers: [AppService, SocketGateway, SchedulerService, FeatureflagService],
  exports: [AppService, SocketGateway, FeatureflagService],
})
export class AppModule {}
