import { j as r } from "../../_virtual/jsx-runtime.js";
import { ProgressBarContainer as m, ProgressBarHeader as j, LabelText as h, LabelDetailsText as c, ProgressBarEmpty as u, ProgressBarFiller as f, IndeterminateProgressBarFiller as g, AssistiveText as p } from "./styles.js";
import { getId as n } from "../../utils/index.js";
function b({
  percentage: s,
  label: t,
  labelDetails: a,
  assistiveText: i,
  color: d = "primary",
  variant: o = "default",
  ...e
}) {
  if (s < 0 || s > 100)
    return console.warn("Component with wrong percentage value ", s), null;
  const l = n(e["data-testid"]), x = n(e["data-testid"]);
  return /* @__PURE__ */ r.jsxs(
    m,
    {
      "data-testid": l("progress-bar"),
      "data-trackid": x("progress-bar"),
      "aria-label": e["aria-label"],
      children: [
        (t || a) && /* @__PURE__ */ r.jsxs(j, { children: [
          /* @__PURE__ */ r.jsx(h, { children: t }),
          /* @__PURE__ */ r.jsx(c, { children: a })
        ] }),
        /* @__PURE__ */ r.jsx(u, { children: o === "default" ? /* @__PURE__ */ r.jsx(f, { color: d, width: s }) : /* @__PURE__ */ r.jsx(g, { color: d, width: s }) }),
        i && /* @__PURE__ */ r.jsx(p, { children: i })
      ]
    }
  );
}
export {
  b as ProgressBar
};
