import { useRef as v, useState as n, useCallback as e } from "react";
function R(o) {
  const p = v(o), [u, c] = n(o), [r, s] = n(0), S = e(() => s((t) => t + 1), []), f = e(() => s((t) => t - 1), []), i = e(() => {
    c(p.current), s(0);
  }, []), l = e((t, m) => {
    c((g) => g.map((a, k) => k === t ? { ...a, status: m } : a));
  }, []);
  return { steps: u, activeStep: r, goNext: S, goBack: f, reset: i, setStepStatus: l };
}
export {
  R as default
};
//# sourceMappingURL=useStepperLayoutState.js.map
