"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const propTypes = {
  children: _propTypes.default.node.isRequired,
  // eslint-disable-next-line react/forbid-prop-types
  config: _propTypes.default.object.isRequired
};
const childContextTypes = {
  // eslint-disable-next-line react/forbid-prop-types
  config: _propTypes.default.object
};
class ConfigProvider extends _react.Component {
  getChildContext() {
    const {
      config
    } = this.props;
    return {
      config
    };
  }
  render() {
    const {
      children
    } = this.props;
    return _react.Children.only(children);
  }
}
exports.default = ConfigProvider;
ConfigProvider.propTypes = propTypes;
ConfigProvider.childContextTypes = childContextTypes;