import _Switch from "@alifd/next/es/switch";
import _Rating from "@alifd/next/es/rating";
import _TimePicker from "@alifd/next/es/time-picker2";
import _NumberPicker from "@alifd/next/es/number-picker";
import _DatePicker from "@alifd/next/es/date-picker2";
import _Input from "@alifd/next/es/input";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import React from 'react';
//这是共用控件类型组件
var BizItem = /*#__PURE__*/function (_React$Component) {
  _inheritsLoose(BizItem, _React$Component);
  function BizItem(props) {
    var _this;
    _this = _React$Component.call(this, props) || this;
    _this.renderChild_ = function () {
      var _this$props = _this.props,
        componentType = _this$props.componentType,
        placeholder = _this$props.placeholder;
      if (componentType === 'Input') {
        return /*#__PURE__*/React.createElement(_Input, {
          placeholder: placeholder
        });
      }
      if (componentType === 'DatePicker') {
        return /*#__PURE__*/React.createElement(_DatePicker, {
          placeholder: placeholder
        });
      }
      if (componentType === 'TextArea') {
        return /*#__PURE__*/React.createElement(_Input.TextArea, {
          placeholder: placeholder
        });
      }
      if (componentType === 'NumberPicker') {
        return /*#__PURE__*/React.createElement(_NumberPicker, null);
      }
      if (componentType === 'TimePicker') {
        return /*#__PURE__*/React.createElement(_TimePicker, {
          placeholder: placeholder
        });
      }
      if (componentType === 'Rating') {
        return /*#__PURE__*/React.createElement(_Rating, null);
      }
      if (componentType === 'Switch') {
        return /*#__PURE__*/React.createElement(_Switch, null);
      }
      return /*#__PURE__*/React.createElement(_Input, {
        placeholder: placeholder
      });
    };
    return _this;
  }
  var _proto = BizItem.prototype;
  _proto.render = function render() {
    return this.renderChild_();
  };
  return BizItem;
}(React.Component);
BizItem.dispalyName = 'BizItem';
export default BizItem;