import { jsxs as s, jsx as t } from "react/jsx-runtime";
import { alignItemsEnd as b, justifyContentCenter as N, dFlex as c, alignItemsCenter as x, dFlexColumn as I } from "./index-general.module.js";
import { classNames as h } from "./index-classNames.js";
import { DonutChart as y } from "./index-DonutChart.js";
import { ComponentContainer as D } from "./index-ComponentContainer.js";
import { StatusBadge as F } from "./index-StatusBadge.js";
import { Text as o, FontWeights as l, TextTypes as u } from "./index-Text.js";
import "react";
import n from "./index-DonutChartDirectories.module.scss.js";
const V = (d) => {
  const {
    badgeStatuses: f = [],
    series: m,
    labels: i,
    testId: a
  } = d, g = m.reduce((r, e) => r + e), p = (r, e, C) => s("div", {
    className: h(c, I, x),
    children: [t(o, {
      fontWeight: l.medium,
      children: C
    }), s("div", {
      className: h(c, N, b),
      children: [t(o, {
        fontWeight: l.bold,
        type: u.heading1,
        translate: !1,
        children: e
      }), s(o, {
        fontWeight: l.bold,
        type: u.heading4,
        translate: !1,
        children: ["/", g]
      })]
    })]
  });
  return s(D, {
    className: n.directoriesStatus,
    testId: a ?? "DonutChartDirectories",
    children: [t("div", {
      className: n.donut,
      children: t(y, {
        ...d,
        renderChildrenFn: p,
        testId: `${a}_ChartItself`
      })
    }), t("div", {
      className: n.badges,
      "data-testid": `${a}_Badges`,
      children: f.map((r, e) => t(F, {
        className: n.badge,
        status: r === "publishing" ? "publishingStatic" : r,
        text: i && i[e] ? i[e] : "",
        numberValue: m[e] ?? 0
      }, e))
    })]
  });
};
export {
  V as DonutChartDirectories
};
