"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const RadixProgress = require("@radix-ui/react-progress");
const React = require("react");
const classNames = require("../../utils/classNames.cjs");
const maths = require("../../utils/maths.cjs");
require("../../utils/globals.cjs");
require("./progressBar.theme.css.cjs");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const RadixProgress__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixProgress);
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
const ProgressBar = React__namespace.forwardRef(({ progress, className, indicatorClassName, ...props }, ref) => {
  const style = {
    "--arm-progress-bar-value": `${maths.clamp(progress ?? 0, 0, 100)}%`
  };
  return jsxRuntime.jsx(RadixProgress__namespace.Root, { className: classNames.concat(className, "arm-progress-bar"), value: progress, ref, ...props, children: jsxRuntime.jsx(RadixProgress__namespace.Indicator, { className: classNames.concat(indicatorClassName, "arm-progress-bar-indicator"), style }) });
});
ProgressBar.displayName = "ProgressBar";
exports.ProgressBar = ProgressBar;
//# sourceMappingURL=progressBar.component.cjs.map
