import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { jwtConfig, DatabaseService } from '../../config';
import { AccessControlModule } from '../access-control/access-control.module';
import { JwtStrategy } from '../owner/strategies/jwt.strategy';
import { HiringSourcesController } from './hiring_sources.controller';
import { HiringSourcesService } from './hiring_sources.service';

@Module({
  imports: [
    AccessControlModule,
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: jwtConfig,
    }),
  ],
  controllers: [HiringSourcesController],
  providers: [HiringSourcesService, DatabaseService, JwtStrategy],
})
export class HiringSourcesModule {}
