"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthModule = void 0;
const common_1 = require("@nestjs/common");
const auth_service_1 = require("./services/auth.service");
const mfa_service_1 = require("./services/mfa.service");
const auth_guard_1 = require("./guards/auth.guard");
const token_response_interceptor_1 = require("./interceptors/token-response.interceptor");
const auth_controller_1 = require("./controllers/auth.controller");
const mfa_controller_1 = require("./controllers/mfa.controller");
const auth_session_event_listener_service_1 = require("./services/auth-session-event-listener.service");
const identity_entity_1 = require("../user/entities/identity.entity");
const typeorm_1 = require("@nestjs/typeorm");
const user_entity_1 = require("../user/entities/user.entity");
const password_service_1 = require("./services/password.service");
const verification_service_1 = require("./services/verification.service");
const otp_entity_1 = require("./entities/otp.entity");
const mfa_secret_entity_1 = require("./entities/mfa-secret.entity");
const access_key_entity_1 = require("../user/entities/access-key.entity");
const trusted_device_entity_1 = require("./entities/trusted-device.entity");
const event_emitter_1 = require("@nestjs/event-emitter");
const user_module_1 = require("../user/user.module");
const core_module_1 = require("../core/core.module");
const session_module_1 = require("../session/session.module");
const tenant_module_1 = require("../tenant/tenant.module");
const role_module_1 = require("../role/role.module");
let AuthModule = class AuthModule {
};
exports.AuthModule = AuthModule;
exports.AuthModule = AuthModule = __decorate([
    (0, common_1.Module)({
        imports: [
            event_emitter_1.EventEmitterModule,
            typeorm_1.TypeOrmModule.forFeature([
                user_entity_1.NestAuthUser,
                otp_entity_1.NestAuthOTP,
                mfa_secret_entity_1.NestAuthMFASecret,
                access_key_entity_1.NestAuthAccessKey,
                identity_entity_1.NestAuthIdentity,
                trusted_device_entity_1.NestAuthTrustedDevice,
            ]),
            (0, common_1.forwardRef)(() => core_module_1.CoreModule),
            (0, common_1.forwardRef)(() => user_module_1.UserModule),
            (0, common_1.forwardRef)(() => session_module_1.SessionModule),
            (0, common_1.forwardRef)(() => tenant_module_1.TenantModule),
            (0, common_1.forwardRef)(() => role_module_1.RoleModule),
        ],
        providers: [
            auth_service_1.AuthService,
            mfa_service_1.MfaService,
            auth_guard_1.NestAuthAuthGuard,
            token_response_interceptor_1.TokenResponseInterceptor,
            auth_session_event_listener_service_1.AuthSessionEventListener,
            password_service_1.PasswordService,
            verification_service_1.VerificationService,
        ],
        controllers: [auth_controller_1.AuthController, mfa_controller_1.MfaController],
        exports: [
            auth_service_1.AuthService,
            password_service_1.PasswordService,
            verification_service_1.VerificationService,
            mfa_service_1.MfaService,
            auth_guard_1.NestAuthAuthGuard,
            token_response_interceptor_1.TokenResponseInterceptor,
        ],
    })
], AuthModule);
//# sourceMappingURL=auth.module.js.map