import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import { usePMaxState } from "./context";

function StepWrapper(_ref) {
  var step = _ref.step,
      children = _ref.children;

  var _usePMaxState = usePMaxState(),
      _usePMaxState2 = _slicedToArray(_usePMaxState, 1),
      state = _usePMaxState2[0];

  if (state.step !== step) return null;
  return children;
}

export default StepWrapper;