import { useContext as r } from "react";
import { StepperContext as s } from "../context/StepperContext.js";
import { StepContext as p } from "../context/StepContext.js";
function S() {
  const e = r(s), t = r(p);
  if (!e) throw new Error("useStepperState must be used inside a <StepperProvider>.");
  if (!t) throw new Error("useStepperState must be used inside a child rendered by <StepperLayout>.");
  return {
    activeStep: e.activeStep,
    activeStepId: e.activeStepId,
    isFirst: e.isFirst,
    isLast: e.isLast,
    steps: e.steps,
    index: t.index,
    currentStep: e.steps[t.index]
  };
}
export {
  S as default
};
//# sourceMappingURL=useStepperState.js.map
