import { Module } from '@nestjs/common';
import { JwtStrategy } from './strategies/jwt-strategy';

import { AuthValidationService } from './services/auth-validation.service';
import { ClientsModule, Transport } from '@nestjs/microservices';
import { LocalStrategy } from './strategies/local.strategy';
import { PassportModule } from '@nestjs/passport';

@Module({
  imports: [
    PassportModule,
    ClientsModule.register([
      {
        name: 'AUTH_SERVICE',
        transport: Transport.TCP,
        options: {
          host: '0.0.0.0', // your auth microservice host
          port: 8880, // your auth microservice TCP port
        },
      },
    ]),
  ],
  providers: [JwtStrategy, LocalStrategy, AuthValidationService],
  exports: [JwtStrategy, LocalStrategy, AuthValidationService],
})
export class AuthCoreLibModule {}
