"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 core_1 = require("@nestjs/core");
const throttler_1 = require("@nestjs/throttler");
const admin_module_1 = require("./admin/admin.module");
const announcements_module_1 = require("./announcements/announcements.module");
const audit_module_1 = require("./audit/audit.module");
const estate_access_guard_1 = require("./auth/estate-access.guard");
const jwt_auth_guard_1 = require("./auth/jwt-auth.guard");
const roles_guard_1 = require("./auth/roles.guard");
const auth_module_1 = require("./auth/auth.module");
const checkin_module_1 = require("./checkin/checkin.module");
const database_module_1 = require("./database/database.module");
const estates_module_1 = require("./estates/estates.module");
const feature_access_guard_1 = require("./features/feature-access.guard");
const feature_access_module_1 = require("./features/feature-access.module");
const gates_module_1 = require("./gates/gates.module");
const guards_module_1 = require("./guards/guards.module");
const incidents_module_1 = require("./incidents/incidents.module");
const integration_config_module_1 = require("./integrations/integration-config.module");
const notifications_module_1 = require("./notifications/notifications.module");
const offline_module_1 = require("./offline/offline.module");
const onboarding_module_1 = require("./onboarding/onboarding.module");
const payment_gateway_module_1 = require("./payments/payment-gateway.module");
const profile_module_1 = require("./profile/profile.module");
const residents_module_1 = require("./residents/residents.module");
const requests_module_1 = require("./requests/requests.module");
const sandbox_module_1 = require("./sandbox/sandbox.module");
const visitors_module_1 = require("./visitors/visitors.module");
const app_controller_1 = require("./app.controller");
let AppModule = class AppModule {
};
exports.AppModule = AppModule;
exports.AppModule = AppModule = __decorate([
    (0, common_1.Module)({
        imports: [
            config_1.ConfigModule.forRoot({ isGlobal: true }),
            throttler_1.ThrottlerModule.forRoot([
                {
                    name: 'short',
                    ttl: 60000,
                    limit: 10
                },
                {
                    name: 'auth',
                    ttl: 60000,
                    limit: 5
                }
            ]),
            database_module_1.DatabaseModule,
            integration_config_module_1.IntegrationConfigModule,
            audit_module_1.AuditModule,
            announcements_module_1.AnnouncementsModule,
            admin_module_1.AdminModule,
            auth_module_1.AuthModule,
            estates_module_1.EstatesModule,
            feature_access_module_1.FeatureAccessModule,
            gates_module_1.GatesModule,
            guards_module_1.GuardsModule,
            residents_module_1.ResidentsModule,
            visitors_module_1.VisitorsModule,
            checkin_module_1.CheckinModule,
            offline_module_1.OfflineModule,
            onboarding_module_1.OnboardingModule,
            incidents_module_1.IncidentsModule,
            notifications_module_1.NotificationsModule,
            payment_gateway_module_1.PaymentGatewayModule,
            profile_module_1.ProfileModule,
            requests_module_1.RequestsModule,
            sandbox_module_1.SandboxModule
        ],
        controllers: [app_controller_1.AppController],
        providers: [
            {
                provide: core_1.APP_GUARD,
                useClass: jwt_auth_guard_1.JwtAuthGuard
            },
            {
                provide: core_1.APP_GUARD,
                useClass: estate_access_guard_1.EstateAccessGuard
            },
            {
                provide: core_1.APP_GUARD,
                useClass: roles_guard_1.RolesGuard
            },
            {
                provide: core_1.APP_GUARD,
                useClass: feature_access_guard_1.FeatureAccessGuard
            }
        ]
    })
], AppModule);
//# sourceMappingURL=app.module.js.map