text: "use strict";
  
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;
  
  var _react = _interopRequireDefault(require("react"));
  
  var _propTypes = _interopRequireDefault(require("prop-types"));
  
  var _classnames = _interopRequireDefault(require("classnames"));
  
  var _utils = require("../core/utils");
  
  var cx = (0, _utils.createClassNames)('SmartSort');
  
  var SmartSort = function SmartSort(_ref) {
    var _ref$className = _ref.className,
        className = _ref$className === void 0 ? '' : _ref$className,
        isVirtualReplica = _ref.isVirtualReplica,
        isSmartSorted = _ref.isSmartSorted,
        ButtonTextComponent = _ref.buttonTextComponent,
        TextComponent = _ref.textComponent,
        refine = _ref.refine;
    return !isVirtualReplica ? null : _react.default.createElement("div", {
      className: (0, _classnames.default)(cx(''), className)
    }, _react.default.createElement("div", {
      className: cx('text')
    }, _react.default.createElement(TextComponent, {
      isSmartSorted: isSmartSorted
    })), _react.default.createElement("button", {
      className: cx('button'),
      onClick: function onClick() {
        return refine(isSmartSorted ? 0 : undefined);
      }
    }, _react.default.createElement(ButtonTextComponent, {
      isSmartSorted: isSmartSorted
    })));
  };
  
  SmartSort.propTypes = {
    buttonTextComponent: _propTypes.default.func.isRequired,
    className: _propTypes.default.string,
    isVirtualReplica: _propTypes.default.bool.isRequired,
    isSmartSorted: _propTypes.default.bool.isRequired,
    refine: _propTypes.default.func.isRequired,
    textComponent: _propTypes.default.func.isRequired
  };
  var _default = SmartSort;
  exports.default = _default;