import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { PermissionResolverService } from '../../common/access-control/permission-resolver.service';
import { DatabaseService, jwtConfig } from '../../config';
import { JwtStrategy } from '../owner/strategies/jwt.strategy';
import { DesignationsController } from './designations.controller';
import { DesignationsService } from './designations.service';

@Module({
  imports: [
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: jwtConfig,
    }),
  ],
  controllers: [DesignationsController],
  providers: [
    DesignationsService,
    DatabaseService,
    JwtStrategy,
    PermissionResolverService,
  ],
})
export class DesignationsModule {}
