import { jsx as r, jsxs as l } from "react/jsx-runtime";
import { l as m } from "./index.C1ZfizMq.js";
import { a as d } from "./index.CfQlFjZU.js";
import { a as u } from "./ProgressTrackerStep.DCF_sW2Z.js";
const k = "creator_progressTracker_symJJ", b = "creator_container_mYEwa", f = "creator_indicator_BThe-", g = "creator_track_51psu", s = { progressTracker: k, container: b, indicator: f, track: g };
function T(a) {
  const c = a.steps.map((e, t) => t === a.activeStepIndex ? {
    label: e.label,
    state: "present"
  } : t < a.activeStepIndex ? {
    label: e.label,
    state: "past"
  } : {
    label: e.label,
    state: "future"
  }), o = 100 / (a.steps.length + 1) * (a.activeStepIndex + 1);
  return {
    steps: c,
    indicatorStyle: {
      width: `${o}%`
    },
    indicatorClassName: s.indicator,
    trackClassName: s.track,
    progressTrackerClassName: s.progressTracker,
    containerClassName: s.container
  };
}
function p({
  steps: a,
  indicatorStyle: c,
  indicatorClassName: o,
  trackClassName: e,
  progressTrackerClassName: t,
  containerClassName: i
}) {
  return /* @__PURE__ */ r("ol", { className: t, children: /* @__PURE__ */ l("div", { className: i, children: [
    /* @__PURE__ */ r(
      "div",
      {
        "data-testid": "indicator",
        style: c,
        className: o
      }
    ),
    /* @__PURE__ */ r("div", { className: e }),
    /* @__PURE__ */ r(
      m,
      {
        values: a,
        layout: (n) => /* @__PURE__ */ r(
          u,
          {
            state: n.state,
            label: n.label
          },
          n.label
        )
      }
    )
  ] }) });
}
const x = d(p, T);
export {
  p as P,
  x as a,
  T as u
};
