import {
  BridgeMetricsReporter
} from "./chunk-AQFQ4BYM.js";
import {
  ObservabilityService
} from "./chunk-W2UIDI3R.js";
import {
  OBSERVABILITY,
  OBSERVABILITY_MODULE_OPTIONS
} from "./chunk-Y7RRSEOC.js";
import {
  __decorateClass
} from "./chunk-2E224ZSN.js";

// runtime/subsystems/observability/observability.module.ts
import { Module } from "@nestjs/common";
var ObservabilityModule = class {
  static forRoot(options = {}) {
    const providers = [
      // Expose the resolved options so internal reporters can read their
      // own config via `OBSERVABILITY_MODULE_OPTIONS`.
      { provide: OBSERVABILITY_MODULE_OPTIONS, useValue: options },
      // Register the concrete class as the canonical instance.
      ObservabilityService,
      // OBSERVABILITY token points at the same instance — consumers inject
      // the token, not the class, per ADR-025 §Shape (index.ts does NOT
      // export `ObservabilityService`).
      { provide: OBSERVABILITY, useExisting: ObservabilityService }
    ];
    if (options.reporters?.bridgeMetrics?.enabled === true) {
      providers.push(BridgeMetricsReporter);
    }
    return {
      module: ObservabilityModule,
      global: true,
      providers,
      exports: [OBSERVABILITY, OBSERVABILITY_MODULE_OPTIONS]
    };
  }
};
ObservabilityModule = __decorateClass([
  Module({})
], ObservabilityModule);

export {
  ObservabilityModule
};
//# sourceMappingURL=chunk-E45CSC33.js.map