import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { jwtConfig, DatabaseService, UploadService } from '../../config';
import { JwtStrategy } from '../owner/strategies/jwt.strategy';
import { EventsController } from './events.controller';
import { EventsService } from './events.service';

@Module({
  imports: [
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: jwtConfig,
    }),
  ],
  controllers: [EventsController],
  providers: [EventsService, DatabaseService, UploadService, JwtStrategy],
})
export class EventsModule {}
