import { initializeLogger as h } from "@seamless/logger";
import { isPlainObject as O } from "../../core/utilities.mjs";
import { LOG_LEVEL as s } from "../levels.mjs";
class b {
  config;
  constructor(r) {
    this.config = r;
  }
  report(r, t) {
    const { enabled: e, env: o = "PROD", namespace: g, tenant: c, service: p, version: m } = this.config, { args: f, date: l, group: d, level: a } = t;
    if (e && (a === s.ERROR || a === s.DEFAULT)) {
      const u = h(g, {
        tenant: c,
        configs: {
          env: o,
          service: p,
          version: m
        }
      }), i = [];
      for (const n of f)
        O(n) ? i.push(JSON.parse(JSON.stringify(n))) : i.push(n);
      u.error(`${r}`, { date: l, group: d, data: i });
    }
  }
  // biome-ignore lint/correctness/noUnusedVariables: reason
  reportInfo(r, t, ...e) {
  }
  // biome-ignore lint/correctness/noUnusedVariables: reason
  reportWarning(r, t, ...e) {
  }
  reportError(r, t, ...e) {
    const o = new Intl.DateTimeFormat(["pt-PT", "de-DE", "en-GB"], {
      year: "numeric",
      month: "2-digit",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    }).format(Date.now());
    this.report(r, { level: s.ERROR, date: o, group: t, args: e });
  }
  getOptions() {
    return this.config;
  }
}
export {
  b as DatadogReporter
};
//# sourceMappingURL=datadog.mjs.map
