import { jsx as e, jsxs as s } from "react/jsx-runtime";
import { a as C } from "./Stack.XB4icBMm.js";
import { s as l } from "./cardContent.module.CnKTot8N.js";
import { c as m } from "./index.CfM2L_w0.js";
import { a as n } from "./index.CfQlFjZU.js";
import { T as o } from "./TooltipEllipsis.CaTHJqXN.js";
import { n as c } from "./index.B0wX8xO7.js";
import { T as f } from "./Tooltip.Bw3DPT1B.js";
import { E as h } from "./EllipsisText.DFxnPYIe.js";
import { L as g } from "./LoadingState.BcrOPPws.js";
function p({ size: a = "xsmall", children: t }) {
  return {
    className: m(l.cardLabel, {
      [l.xsmall]: a === "xsmall"
    }),
    children: t
  };
}
function b({ className: a, children: t }) {
  return /* @__PURE__ */ e("div", { className: a, children: t });
}
const N = n(b, p, "CardLabel");
function v({ size: a = "medium", children: t }) {
  return {
    className: m(l.cardAccent, {
      [l.xsmall]: a === "xsmall",
      [l.small]: a === "small",
      [l.medium]: a === "medium",
      [l.large]: a === "large",
      [l.xlarge]: a === "xlarge",
      [l.xxlarge]: a === "2xlarge"
    }),
    children: t
  };
}
function w({ className: a, children: t }) {
  return /* @__PURE__ */ e("div", { className: a, children: t });
}
const L = n(w, v, "CardAccent");
function S(a) {
  return {
    icon: a.icon,
    value: a.value,
    label: a.label,
    tooltipValue: a.tooltipValue,
    loading: !!a.loading,
    labelContainerClassName: l.labelContainer,
    cardIconClassName: l.cardIcon
  };
}
function T({
  icon: a,
  value: t,
  label: r,
  tooltipValue: i,
  loading: d,
  labelContainerClassName: u,
  cardIconClassName: x
}) {
  return /* @__PURE__ */ s(C, { direction: "column", spacing: 0.5, children: [
    /* @__PURE__ */ s("div", { className: u, children: [
      /* @__PURE__ */ e(a, { className: x, size: 24 }),
      /* @__PURE__ */ e(N, { size: "xsmall", children: /* @__PURE__ */ e(o, { text: r, children: r }) })
    ] }),
    /* @__PURE__ */ e(
      c,
      {
        value: d,
        then: /* @__PURE__ */ e(g, { type: "wheel", size: "small" }),
        otherwise: /* @__PURE__ */ e(L, { size: "xlarge", children: /* @__PURE__ */ e(
          c,
          {
            value: !!i,
            then: /* @__PURE__ */ e(
              f,
              {
                text: i,
                placement: "bottom",
                variant: "subtle",
                children: /* @__PURE__ */ e(h, { children: t })
              }
            ),
            otherwise: /* @__PURE__ */ e(o, { text: t || "", children: t })
          }
        ) })
      }
    )
  ] });
}
const D = n(
  T,
  S
);
export {
  D as C
};
