import { Module } from '@nestjs/common';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';

import { TypeOrmModule } from '@nestjs/typeorm';
import { JWTModule } from '../services/authentication/jwt/jwt.module';

import { APP_GUARD } from '@nestjs/core';
import { AuthGuard } from '../shared/guards/auth/auth.guard';
import { GoogleAuthModule } from '../services/authentication/google-auth/google-auth.module';

@Module({
  imports: [TypeOrmModule, JWTModule, GoogleAuthModule],
  controllers: [AuthController],
  providers: [
    AuthService,
    {
      provide: APP_GUARD,
      useClass: AuthGuard,
    },
  ],
})
export class AuthModule {}
