'use strict';
'use client';
import { jsx } from 'react/jsx-runtime';
import { logError } from '../../../fd-toolbox/server/logging/logger.js';
import { ReportCard } from './report-card/ReportCard.js';
import { ReportChart } from './report-chart/ReportChart.js';
import { reportTypes } from '../reports/report-enums.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function ReportComponent({
  type,
  report,
  reportId
}) {
  switch (type) {
    case reportTypes.chart:
      return /* @__PURE__ */jsx(ReportChart, {
        report,
        reportId
      });
    case reportTypes.number:
      return /* @__PURE__ */jsx(ReportCard, {
        report,
        reportId
      });
    default:
      logError(`${ReportComponent.name}, unknown report type: ${type}`);
      return void 0;
  }
}
__name(ReportComponent, "ReportComponent");

export { ReportComponent };
