"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.MainModule = void 0;
const common_1 = require("@nestjs/common");
const config_1 = require("@nestjs/config");
const lodash_1 = require("lodash");
const app_toolkit_module_1 = require("./app-toolkit/app-toolkit.module");
const apps_module_1 = require("./apps/apps.module");
const balance_module_1 = require("./balance/balance.module");
const cache_module_1 = require("./cache/cache.module");
const scheduler_module_1 = require("./scheduler/scheduler.module");
const stats_module_1 = require("./stats/stats.module");
let MainModule = class MainModule {
};
MainModule = __decorate([
    (0, common_1.Module)({
        imports: [
            apps_module_1.AppsModule.registerAsync({ appToolkitModule: app_toolkit_module_1.AppToolkitModule }),
            cache_module_1.CacheModule,
            scheduler_module_1.SchedulerModule,
            app_toolkit_module_1.AppToolkitModule,
            stats_module_1.StatsModule,
            balance_module_1.BalanceModule,
            config_1.ConfigModule.forRoot({
                isGlobal: true,
                load: [
                    () => {
                        var _a, _b, _c;
                        return ({
                            zapperApi: {
                                url: (_a = process.env.ZAPPER_API_URL) !== null && _a !== void 0 ? _a : 'https://api.zapper.fi',
                                key: (_b = process.env.ZAPPER_API_KEY) !== null && _b !== void 0 ? _b : 'ad01527e-8133-4a68-ad67-fbf8d9040ad1',
                            },
                            apiResolvedPositions: (0, lodash_1.compact)(((_c = process.env.API_RESOLVED_POSITIONS) !== null && _c !== void 0 ? _c : '').split(',')),
                        });
                    },
                ],
            }),
        ],
    })
], MainModule);
exports.MainModule = MainModule;
//# sourceMappingURL=main.module.js.map