import { jsxs as m, jsx as r } from "react/jsx-runtime";
import { forwardRef as c, Fragment as f } from "react";
import { cx as p } from "../../utils/classNames.js";
import { useArrowTheme as u } from "../../hooks/useArrowTheme.js";
import { Divider as x } from "../divider/Divider.js";
const v = c(
  ({
    id: t,
    inverse: i,
    title: e,
    subtitle: a,
    startLabel: n,
    endLabel: o,
    currentValue: s = 0,
    maxValue: l = 100,
    color: d = "branded",
    labelLocation: g = "top",
    className: h
  }, b) => {
    const N = u(), _ = i ?? N.inverse;
    return /* @__PURE__ */ m(
      "div",
      {
        ref: b,
        id: t,
        className: p("tdds-progress-bar", h),
        "data-inverse": _ ? "true" : void 0,
        "data-label-location": g,
        "data-color": d,
        style: {
          "--current-value": s,
          "--max-value": l
        },
        children: [
          e ? /* @__PURE__ */ r("span", { className: "tdds-progress-bar__title", children: e }) : null,
          a ? /* @__PURE__ */ r("span", { className: "tdds-progress-bar__subtitle", children: a }) : null,
          n ? /* @__PURE__ */ r("span", { className: "tdds-progress-bar__label-start", children: n }) : null,
          o ? /* @__PURE__ */ r("span", { className: "tdds-progress-bar__label-end", children: o }) : null
        ]
      }
    );
  }
);
v.displayName = "ProgressBar";
const P = c(
  ({ inverse: t, hasDivider: i, progressBars: e, className: a }, n) => {
    const o = u(), s = t ?? o.inverse;
    return /* @__PURE__ */ r(
      "div",
      {
        ref: n,
        className: p("tdds-progress-bar-group", a),
        "data-inverse": s ? "true" : void 0,
        children: e.map((l, d) => /* @__PURE__ */ m(f, { children: [
          /* @__PURE__ */ r(v, { ...l, inverse: s }),
          i && d < e.length - 1 ? /* @__PURE__ */ r(x, { inverse: s }) : null
        ] }, l.id ?? d))
      }
    );
  }
);
P.displayName = "ProgressBarGroup";
export {
  v as ProgressBar,
  P as ProgressBarGroup
};
//# sourceMappingURL=ProgressBar.js.map
