import { jsxs as A, jsx as s } from "react/jsx-runtime";
import t from "../../utils/classNames.js";
import { SMALL as B, LARGE as z, LEFT as I, BOLD as F, RIGHT as y, TOP as H } from "./StatusBarConstants.js";
import { StatusBarProgressBar as M } from "./StatusBarProgressBar.js";
import k from "./StatusBarIcon.js";
import q from "./StatusBarLabel.js";
const J = { name: "", alignment: I }, K = { value: "", alignment: y, weight: F }, _ = (r) => {
  const { progress: N = [], size: n = B, className: S = "", useProgressDivider: C = !0 } = r, a = { ...J, ...r.icon }, e = { ...K, ...r.label }, o = !!a.name, i = a.alignment === I, c = a.alignment === y, m = !!e.value, g = e.alignment === I, f = e.alignment === H, d = e.alignment === y, O = o && !m, R = !o && m, l = o && m, p = l && i && d, h = l && c && g, L = l && i && g, b = l && c && d, D = O && i, T = O && c, x = R && g, u = R && d, W = t(
    "StatusBar",
    "width-100pct",
    "display-flex",
    f ? "align-items-end" : "align-items-center",
    S
  ), j = t(
    "display-flex",
    "flex-1-0",
    f && "flex-order-1 flex-column margin-bottom-10",
    (b || h || T) && "flex-order-1 align-items-center",
    (L || p || D) && "flex-order-2 align-items-center",
    (x || u) && "align-items-center"
  ), w = t(
    f && "display-flex justify-content-center",
    (L || h || x) && "flex-order-1 margin-right-10",
    (b || p || u) && "flex-order-2 margin-left-10"
  ), P = t(
    "display-flex",
    "flex-1-0",
    (L || h || x) && "flex-order-2",
    (b || p || u) && "flex-order-1"
  ), E = t(
    "progress",
    "margin-0",
    "flex-1-0",
    n === B && "height-5",
    n === z && "height-10"
  );
  return /* @__PURE__ */ A("div", { className: W, children: [
    /* @__PURE__ */ s(k, { icon: a, size: n }),
    /* @__PURE__ */ A("div", { className: j, children: [
      /* @__PURE__ */ s(q, { label: e, size: n, className: w }),
      /* @__PURE__ */ s("div", { className: P, children: /* @__PURE__ */ s("div", { className: E, children: N.map((G, v) => /* @__PURE__ */ s(
        M,
        {
          progress: G,
          index: v,
          useProgressDivider: C
        },
        v
      )) }) })
    ] })
  ] });
};
export {
  _ as default
};
//# sourceMappingURL=StatusBar.js.map
