'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

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: _propTypes2.default.node.isRequired,
  recordTypes: _propTypes2.default.object.isRequired
};

RecordTypesProvider.childContextTypes = {
  recordTypes: _propTypes2.default.object
};