"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HealthModule = void 0;
const app_1 = require("@deepkit/app");
/*@ts-ignore*/
var { __ΩClassType } = require('@deepkit/core');
const helpers_1 = require("../telemetry/otel/helpers");
const metrics_controller_1 = require("../telemetry/otel/metrics.controller");
const healthcheck_controller_1 = require("./healthcheck.controller");
const healthcheck_service_1 = require("./healthcheck.service");
function getHealthControllers() {
    const controllers = [healthcheck_controller_1.HealthcheckController];
    if (helpers_1.OtelState.prometheusExporter) {
        controllers.push(metrics_controller_1.MetricsController);
    }
    return controllers;
}
getHealthControllers.__type = [() => __ΩClassType, 'getHealthControllers', 'Pn!F/"'];
const HealthModuleBase = (0, app_1.createModuleClass)({
    providers: [healthcheck_service_1.HealthcheckService],
    exports: [healthcheck_service_1.HealthcheckService]
});
class HealthModule extends HealthModuleBase {
    process() {
        for (const controller of getHealthControllers()) {
            this.addController(controller);
        }
    }
}
exports.HealthModule = HealthModule;
HealthModule.__type = [() => HealthModuleBase, 'process', 'HealthModule', 'P7!P"0"5w#'];
//# sourceMappingURL=health.module.js.map