import { $ as m, b as u, a as x } from "./utils-B6pV5ewr.es.js";
import { $ as p } from "./Label-DIseLESi.es.js";
import { $ as P } from "./number-dMxJejI6.es.js";
import { $ as v } from "./mergeProps-Dsl8k3Ig.es.js";
import { $ as g } from "./filterDOMProps-BSVCO5jK.es.js";
import o, { forwardRef as B, createContext as V } from "react";
import { $ as I } from "./useProgressBar--OvVKto2.es.js";
const R = /* @__PURE__ */ V(null), M = /* @__PURE__ */ B(function(e, a) {
  [e, a] = m(e, a, R);
  let { value: r = 0, minValue: t = 0, maxValue: l = 100, isIndeterminate: d = !1 } = e;
  r = P(r, t, l);
  let [c, b] = u(!e["aria-label"] && !e["aria-labelledby"]), { progressBarProps: f, labelProps: s } = I({
    ...e,
    label: b
  }), n = d ? void 0 : (r - t) / (l - t) * 100, $ = x({
    ...e,
    defaultClassName: "react-aria-ProgressBar",
    values: {
      percentage: n,
      valueText: f["aria-valuetext"],
      isIndeterminate: d
    }
  }), i = g(e, {
    global: !0
  });
  return /* @__PURE__ */ o.createElement("div", {
    ...v(i, $, f),
    ref: a,
    slot: e.slot || void 0
  }, /* @__PURE__ */ o.createElement(p.Provider, {
    value: {
      ...s,
      ref: c,
      elementType: "span"
    }
  }, $.children));
});
export {
  R as $,
  M as a
};
//# sourceMappingURL=ProgressBar-Dm2Ge45l.es.js.map
