text: import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
  import _createClass from "@babel/runtime/helpers/esm/createClass";
  import _inherits from "@babel/runtime/helpers/esm/inherits";
  import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
  import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
  
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  
  import React, { Component } from 'react';
  import PropTypes from 'prop-types';
  import classNames from 'classnames';
  import { createClassNames } from '../core/utils';
  import Select from './Select';
  var cx = createClassNames('SortBy');
  
  var SortBy = /*#__PURE__*/function (_Component) {
    _inherits(SortBy, _Component);
  
    var _super = _createSuper(SortBy);
  
    function SortBy() {
      _classCallCheck(this, SortBy);
  
      return _super.apply(this, arguments);
    }
  
    _createClass(SortBy, [{
      key: "render",
      value: function render() {
        var _this$props = this.props,
            id = _this$props.id,
            items = _this$props.items,
            currentRefinement = _this$props.currentRefinement,
            refine = _this$props.refine,
            className = _this$props.className;
        return /*#__PURE__*/React.createElement("div", {
          className: classNames(cx(''), className)
        }, /*#__PURE__*/React.createElement(Select, {
          id: id,
          cx: cx,
          items: items,
          selectedItem: currentRefinement,
          onSelect: refine
        }));
      }
    }]);
  
    return SortBy;
  }(Component);
  
  _defineProperty(SortBy, "propTypes", {
    id: PropTypes.string,
    items: PropTypes.arrayOf(PropTypes.shape({
      label: PropTypes.string,
      value: PropTypes.string.isRequired
    })).isRequired,
    currentRefinement: PropTypes.string.isRequired,
    refine: PropTypes.func.isRequired,
    className: PropTypes.string
  });
  
  _defineProperty(SortBy, "defaultProps", {
    className: ''
  });
  
  export default SortBy;