"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.AppModule = void 0;
const common_1 = require("@nestjs/common");
const config_1 = require("@nestjs/config");
const typeorm_1 = require("@nestjs/typeorm");
const throttler_1 = require("@nestjs/throttler");
const terminus_1 = require("@nestjs/terminus");
const env_config_1 = require("@config/env.config");
const database_config_1 = require("@config/database.config");
const auth_module_1 = require("@modules/auth/auth.module");
const tenants_module_1 = require("@modules/tenants/tenants.module");
const users_module_1 = require("@modules/users/users.module");
const rbac_module_1 = require("@modules/rbac/rbac.module");
const notifications_module_1 = require("@modules/notifications/notifications.module");
const billing_module_1 = require("@modules/billing/billing.module");
const audit_module_1 = require("@modules/audit/audit.module");
const feature_flags_module_1 = require("@modules/feature-flags/feature-flags.module");
const health_module_1 = require("@modules/health/health.module");
let AppModule = class AppModule {
};
exports.AppModule = AppModule;
exports.AppModule = AppModule = __decorate([
    (0, common_1.Module)({
        imports: [
            config_1.ConfigModule.forRoot({
                isGlobal: true,
                load: [env_config_1.envConfig],
                validationSchema: env_config_1.validationSchema,
            }),
            typeorm_1.TypeOrmModule.forRootAsync({
                imports: [config_1.ConfigModule],
                useFactory: (configService) => (0, database_config_1.databaseConfig)(configService),
                inject: [config_1.ConfigService],
            }),
            throttler_1.ThrottlerModule.forRoot([
                {
                    ttl: 60000,
                    limit: 100,
                },
            ]),
            terminus_1.TerminusModule,
            auth_module_1.AuthModule,
            tenants_module_1.TenantsModule,
            users_module_1.UsersModule,
            rbac_module_1.RbacModule,
            notifications_module_1.NotificationsModule,
            billing_module_1.BillingModule,
            audit_module_1.AuditModule,
            feature_flags_module_1.FeatureFlagsModule,
            health_module_1.HealthModule,
        ],
    })
], AppModule);
//# sourceMappingURL=app.module.js.map