import g from "../../../classnames/index.mjs";
import * as n from "react";
import { getSize as k } from "./utils.mjs";
const v = (a) => {
  const {
    size: s,
    steps: e,
    percent: p = 0,
    strokeWidth: i = 8,
    strokeColor: r,
    trailColor: d = null,
    prefixCls: o,
    children: m
  } = a, c = Math.round(e * (p / 100)), h = s ?? [s === "small" ? 2 : 14, i], [u, f] = k(h, "step", {
    steps: e,
    strokeWidth: i
  }), y = u / e, l = new Array(e);
  for (let t = 0; t < e; t++) {
    const S = Array.isArray(r) ? r[t] : r;
    l[t] = /* @__PURE__ */ n.createElement("div", {
      key: t,
      className: g(`${o}-steps-item`, {
        [`${o}-steps-item-active`]: t <= c - 1
      }),
      style: {
        backgroundColor: t <= c - 1 ? S : d,
        width: y,
        height: f
      }
    });
  }
  return /* @__PURE__ */ n.createElement("div", {
    className: `${o}-steps-outer`
  }, l, m);
}, w = v;
export {
  w as default
};
