import { number, checkPropTypes } from "prop-types";
const limitChildren = (props, propName, componentName) => {
  const { children, [propName]: activeStep } = props;
  checkPropTypes({ [propName]: number }, props, "prop", componentName);
  if (activeStep > children.length - 1) {
    return new Error(
      `Invalid prop "${propName}" supplied to "${componentName}". "${propName}" must be smaller or equal the number of children.`
    );
  }
  return null;
};
var limitChildren_default = limitChildren;
export {
  limitChildren_default as default
};
