import { Module } from "@nestjs/common";
import { APP_FILTER } from "@nestjs/core";
import { AuthController } from "./auth.controller";
import { AuthService } from "./auth.service";
import { AuthGuard } from "./auth.guard";
import { EmailService } from "./email.service";
import { JwtService } from "./jwt.service";
import { ProfileController } from "./profile.controller";
import { ProfileService } from "./profile.service";
import { ZodExceptionFilter } from "../common/zod-exception.filter";

@Module({
  controllers: [AuthController, ProfileController],
  providers: [
    AuthService,
    AuthGuard,
    EmailService,
    JwtService,
    ProfileService,
    { provide: APP_FILTER, useClass: ZodExceptionFilter },
  ],
  exports: [AuthGuard, JwtService],
})
export class AuthModule {}
