"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _select = _interopRequireDefault(require("@alifd/next/lib/select"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _react = _interopRequireDefault(require("react"));
var _baseTableField = _interopRequireDefault(require("./baseTableField"));
var _excluded = ["nextTablePrefix", "value", "onChange", "rules", "name", "renderChildren"];
var SelectField = /*#__PURE__*/function (_BaseTableField) {
  (0, _inheritsLoose2["default"])(SelectField, _BaseTableField);
  function SelectField() {
    return _BaseTableField.apply(this, arguments) || this;
  }
  var _proto = SelectField.prototype;
  _proto.renderField = function renderField() {
    var field = this.field;
    var _this$props = this.props,
      nextTablePrefix = _this$props.nextTablePrefix,
      value = _this$props.value,
      onChange = _this$props.onChange,
      rules = _this$props.rules,
      name = _this$props.name,
      renderChildren = _this$props.renderChildren,
      rest = (0, _objectWithoutPropertiesLoose2["default"])(_this$props, _excluded);
    return /*#__PURE__*/_react["default"].createElement(_select["default"], (0, _extends2["default"])({
      className: nextTablePrefix + "select"
    }, field.init(name, {
      rules: rules
    }, rest)), renderChildren ? renderChildren() : null);
  };
  return SelectField;
}(_baseTableField["default"]);
exports["default"] = SelectField;