"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 }; }

class RecordTypesProvider extends _react.Component {
  getChildContext() {
    return {
      recordTypes: this.props.recordTypes
    };
  }

  render() {
    return _react.Children.only(this.props.children);
  }

}

exports.default = RecordTypesProvider;
RecordTypesProvider.propTypes = {
  children: _propTypes.default.node.isRequired,
  recordTypes: _propTypes.default.object.isRequired
};
RecordTypesProvider.childContextTypes = {
  recordTypes: _propTypes.default.object
};