import { Module } from "@nestjs/common";
import { APP_GUARD } from "@nestjs/core";
import { IamModule } from "./iam/iam.module.js";
import { HealthModule } from "./shared/health/health.module.js";
import { PermissionGuard } from "./middleware/permission.guard.js";
import { LifecycleService } from "./shared/lifecycle/lifecycle.service.js";

@Module({
  imports: [IamModule, HealthModule],
  providers: [
    { provide: APP_GUARD, useClass: PermissionGuard },
    LifecycleService,
  ],
})
export class AppModule {}
