text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
  
  var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  
  var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
  
  var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  
  var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
  
  var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  
  var _inherits2 = require('babel-runtime/helpers/inherits');
  
  var _inherits3 = _interopRequireDefault(_inherits2);
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _propTypes = require('prop-types');
  
  var _propTypes2 = _interopRequireDefault(_propTypes);
  
  var _classnames = require('classnames');
  
  var _classnames2 = _interopRequireDefault(_classnames);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  
  var propTypes = {
    prefixCls: _propTypes2["default"].string,
    className: _propTypes2["default"].string,
    style: _propTypes2["default"].object,
    icon: _propTypes2["default"].any,
    loading: _propTypes2["default"].any,
    distanceToRefresh: _propTypes2["default"].number,
    refreshing: _propTypes2["default"].bool,
    onRefresh: _propTypes2["default"].func.isRequired
  };
  
  var RefreshControl = function (_React$Component) {
    (0, _inherits3["default"])(RefreshControl, _React$Component);
  
    function RefreshControl(props) {
      (0, _classCallCheck3["default"])(this, RefreshControl);
  
      var _this = (0, _possibleConstructorReturn3["default"])(this, _React$Component.call(this, props));
  
      _this.state = {
        active: false,
        deactive: false,
        loadingState: false
      };
      return _this;
    }
  
    RefreshControl.prototype.render = function render() {
      var _classNames;
  
      var _props = this.props,
          prefixCls = _props.prefixCls,
          _props$className = _props.className,
          className = _props$className === undefined ? '' : _props$className,
          style = _props.style,
          icon = _props.icon,
          loading = _props.loading,
          refreshing = _props.refreshing;
      var _state = this.state,
          active = _state.active,
          deactive = _state.deactive,
          loadingState = _state.loadingState;
  
      var wrapCls = (0, _classnames2["default"])((_classNames = {}, (0, _defineProperty3["default"])(_classNames, className, className), (0, _defineProperty3["default"])(_classNames, prefixCls + '-ptr', true), (0, _defineProperty3["default"])(_classNames, prefixCls + '-active', active), (0, _defineProperty3["default"])(_classNames, prefixCls + '-deactive', deactive), (0, _defineProperty3["default"])(_classNames, prefixCls + '-loading', loadingState || refreshing), _classNames));
      return _react2["default"].createElement(
        'div',
        { ref: 'ptr', className: wrapCls, style: style },
        _react2["default"].createElement(
          'div',
          { className: prefixCls + '-ptr-icon' },
          icon
        ),
        _react2["default"].createElement(
          'div',
          { className: prefixCls + '-ptr-loading' },
          loading
        )
      );
    };
  
    return RefreshControl;
  }(_react2["default"].Component);
  
  RefreshControl.propTypes = propTypes;
  RefreshControl.defaultProps = {
    prefixCls: 'list-view-refresh-control',
    distanceToRefresh: 50,
    refreshing: false,
    icon: [_react2["default"].createElement(
      'div',
      { key: '0', className: 'list-view-refresh-control-pull' },
      '\u2193 \u4E0B\u62C9'
    ), _react2["default"].createElement(
      'div',
      { key: '1', className: 'list-view-refresh-control-release' },
      '\u2191 \u91CA\u653E'
    )],
    loading: _react2["default"].createElement(
      'div',
      null,
      'loading...'
    )
  };
  exports["default"] = RefreshControl;
  module.exports = exports['default'];