;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c6d20d48-407b-4be4-af37-07c4e78a2962", e._sentryDebugIdIdentifier = "sentry-dbid-c6d20d48-407b-4be4-af37-07c4e78a2962");
  } catch (e) {
  }
}
;
import { jsx, jsxs } from "preact/jsx-runtime";
import cx from "classnames";
const progressBar = "adyen-kyc-progress-bar";
const progressBarRounded = "adyen-kyc-progress-bar-rounded";
const progressBarIndicator = "adyen-kyc-progress-bar-indicator";
const styles = {
  progressBar,
  progressBarRounded,
  progressBarIndicator
};
const ProgressBar = ({ progress, ariaLabel, rounded = false }) => {
  const clamp = (value) => {
    return Math.min(Math.max(value, 0), 100);
  };
  const clampedProgress = clamp(progress);
  const cssWidth = `${clampedProgress}%`;
  const className = cx(styles.progressBar, {
    [styles.progressBarRounded]: rounded
  });
  return /* @__PURE__ */ jsx(
    "div",
    {
      className,
      role: "progressbar",
      "aria-label": ariaLabel,
      "aria-valuenow": clampedProgress,
      "aria-valuemin": 0,
      "aria-valuemax": 100,
      children: /* @__PURE__ */ jsxs("div", { className: styles.progressBarIndicator, style: { width: cssWidth }, children: [
        progress,
        "%"
      ] })
    }
  );
};
export {
  ProgressBar as P
};
