import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { DatabaseService, jwtConfig } from '../../config';
import { NotificationGateway } from '../../notification.socket';
import { AccessControlModule } from '../access-control/access-control.module';
import { NotificationsService } from '../notifications/notifications.service';
import { JwtStrategy } from '../owner/strategies/jwt.strategy';
import { HolidaysController } from './holidays.controller';
import { HolidaysService } from './holidays.service';

@Module({
  imports: [
    AccessControlModule,
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: jwtConfig,
    }),
  ],
  controllers: [HolidaysController],
  providers: [
    HolidaysService,
    DatabaseService,
    JwtStrategy,
    NotificationsService,
    NotificationGateway,
  ],
})
export class HolidaysModule {}
