text: "use strict";
  
  var _react = _interopRequireDefault(require("react"));
  
  var _propTypes = _interopRequireDefault(require("prop-types"));
  
  var _VisionContainer = _interopRequireDefault(require("./containers/VisionContainer"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  // Passes the given Sanity client and components to use down
  // through context to child components
  class Vision extends _react.default.PureComponent {
    getChildContext() {
      return {
        client: this.props.client,
        styles: this.props.styles,
        schema: this.props.schema,
        components: this.props.components
      };
    }
  
    render() {
      return /*#__PURE__*/_react.default.createElement(_VisionContainer.default, this.props);
    }
  
  }
  
  Vision.propTypes = {
    client: _propTypes.default.shape({
      config: _propTypes.default.func
    }).isRequired,
    schema: _propTypes.default.object,
    components: _propTypes.default.shape({
      Button: _propTypes.default.func
    }).isRequired,
    styles: _propTypes.default.shape({
      visionGui: _propTypes.default.object
    })
  };
  Vision.defaultProps = {
    styles: {
      visionGui: {}
    }
  };
  Vision.childContextTypes = {
    client: _propTypes.default.shape({
      config: _propTypes.default.func
    }).isRequired,
    schema: _propTypes.default.object,
    components: _propTypes.default.object.isRequired,
    styles: _propTypes.default.object.isRequired
  };
  module.exports = Vision;