import { jsx as p } from "react/jsx-runtime";
import { useContext as i } from "react";
import { StepperContext as a } from "../context/StepperContext.js";
import { StepContext as u } from "../context/StepContext.js";
const s = ({ stepId: e, children: o }) => {
  const t = i(a);
  if (!t) throw new Error("StepperLayoutPanel must be used inside <StepperLayout>");
  if (t.activeStepId !== e) return null;
  const r = t.steps.findIndex((n) => n.initialData.id === e);
  if (r === -1) throw new Error(`StepperLayoutPanel: unknown stepId "${e}"`);
  return /* @__PURE__ */ p(u.Provider, { value: { index: r }, children: o });
};
s.displayName = "StepperLayoutPanel";
export {
  s as StepperLayoutPanel
};
//# sourceMappingURL=StepperLayoutPanel.js.map
