import _Icon from "@alifd/next/es/icon";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _Select from "@alifd/next/es/select";
import React from 'react';
var Option = _Select.Option;
var WebRowOrder = /*#__PURE__*/function (_React$Component) {
  _inheritsLoose(WebRowOrder, _React$Component);
  function WebRowOrder() {
    return _React$Component.apply(this, arguments) || this;
  }
  var _proto = WebRowOrder.prototype;
  _proto.render = function render() {
    var _this$props = this.props,
      items = _this$props.items,
      nextTablePrefix = _this$props.nextTablePrefix,
      defaultValue = _this$props.defaultValue,
      onChange = _this$props.onChange;
    return /*#__PURE__*/React.createElement("div", {
      className: nextTablePrefix + "row-order"
    }, /*#__PURE__*/React.createElement(_Select, {
      defaultValue: defaultValue.value,
      onChange: onChange,
      hasBorder: false,
      autoWidth: false,
      hasArrow: false,
      valueRender: function valueRender(item) {
        return /*#__PURE__*/React.createElement("span", {
          className: nextTablePrefix + "row-order-v"
        }, /*#__PURE__*/React.createElement(_Icon, {
          type: "order-by",
          size: "small"
        }), item.label);
      }
    }, items.map(function (item) {
      return /*#__PURE__*/React.createElement(Option, {
        key: item.value,
        value: item.value
      }, item.text);
    })));
  };
  return WebRowOrder;
}(React.Component);
export { WebRowOrder as default };