text: Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _partialRight2 = require("lodash/partialRight");
  
  var _partialRight3 = _interopRequireDefault(_partialRight2);
  
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  
  var _propTypes = require("prop-types");
  
  var _propTypes2 = _interopRequireDefault(_propTypes);
  
  var _react = require("react");
  
  var _react2 = _interopRequireDefault(_react);
  
  var _victoryCore = require("victory-core");
  
  var _helperMethods = require("./helper-methods");
  
  var _helperMethods2 = _interopRequireDefault(_helperMethods);
  
  var _commonProps = require("../../helpers/common-props");
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  
  /*eslint-disable no-magic-numbers */
  var fallbackProps = {
    width: 450,
    height: 300,
    padding: 50,
    candleColors: {
      positive: "#ffffff",
      negative: "#252525"
    }
  };
  
  var defaultData = [{ x: new Date(2016, 6, 1), open: 5, close: 10, high: 15, low: 0 }, { x: new Date(2016, 6, 2), open: 10, close: 15, high: 20, low: 5 }, { x: new Date(2016, 6, 3), open: 15, close: 20, high: 25, low: 10 }, { x: new Date(2016, 6, 4), open: 20, close: 25, high: 30, low: 15 }, { x: new Date(2016, 6, 5), open: 25, close: 30, high: 35, low: 20 }, { x: new Date(2016, 6, 6), open: 30, close: 35, high: 40, low: 25 }, { x: new Date(2016, 6, 7), open: 35, close: 40, high: 45, low: 30 }, { x: new Date(2016, 6, 8), open: 40, close: 45, high: 50, low: 35 }];
  /*eslint-enable no-magic-numbers */
  
  var animationWhitelist = ["data", "domain", "height", "padding", "samples", "size", "style", "width"];
  
  var VictoryCandlestick = function (_React$Component) {
    _inherits(VictoryCandlestick, _React$Component);
  
    function VictoryCandlestick() {
      _classCallCheck(this, VictoryCandlestick);
  
      return _possibleConstructorReturn(this, (VictoryCandlestick.__proto__ || Object.getPrototypeOf(VictoryCandlestick)).apply(this, arguments));
    }
  
    _createClass(VictoryCandlestick, [{
      key: "shouldAnimate",
  
  
      // Overridden in native versions
      value: function shouldAnimate() {
        return !!this.props.animate;
      }
    }, {
      key: "render",
      value: function render() {
        var role = this.constructor.role;
  
        var props = _victoryCore.Helpers.modifyProps(this.props, fallbackProps, role);
        if (this.shouldAnimate()) {
          return this.animateComponent(props, animationWhitelist);
        }
        var children = this.renderData(props);
        return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
      }
    }]);
  
    return VictoryCandlestick;
  }(_react2.default.Component);
  
  VictoryCandlestick.displayName = "VictoryCandlestick";
  VictoryCandlestick.role = "candlestick";
  VictoryCandlestick.defaultTransitions = _victoryCore.DefaultTransitions.discreteTransitions();
  VictoryCandlestick.propTypes = _extends({}, _commonProps.BaseProps, _commonProps.DataProps, {
    candleColors: _propTypes2.default.shape({ positive: _propTypes2.default.string, negative: _propTypes2.default.string }),
    close: _propTypes2.default.oneOfType([_propTypes2.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
    high: _propTypes2.default.oneOfType([_propTypes2.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
    low: _propTypes2.default.oneOfType([_propTypes2.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
    open: _propTypes2.default.oneOfType([_propTypes2.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)])
  });
  VictoryCandlestick.defaultProps = {
    containerComponent: _react2.default.createElement(_victoryCore.VictoryContainer, null),
    data: defaultData,
    dataComponent: _react2.default.createElement(_victoryCore.Candle, null),
    groupComponent: _react2.default.createElement("g", { role: "presentation" }),
    labelComponent: _react2.default.createElement(_victoryCore.VictoryLabel, null),
    samples: 50,
    scale: "linear",
    sortOrder: "ascending",
    standalone: true,
    theme: _victoryCore.VictoryTheme.grayscale
  };
  VictoryCandlestick.getDomain = _helperMethods2.default.getDomain.bind(_helperMethods2.default);
  VictoryCandlestick.getData = _helperMethods2.default.getData.bind(_helperMethods2.default);
  VictoryCandlestick.getBaseProps = (0, _partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default), fallbackProps);
  VictoryCandlestick.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
  exports.default = (0, _victoryCore.addEvents)(VictoryCandlestick);