"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _switch = _interopRequireDefault(require("@alifd/next/lib/switch"));
var _rating = _interopRequireDefault(require("@alifd/next/lib/rating"));
var _timePicker = _interopRequireDefault(require("@alifd/next/lib/time-picker2"));
var _numberPicker = _interopRequireDefault(require("@alifd/next/lib/number-picker"));
var _datePicker = _interopRequireDefault(require("@alifd/next/lib/date-picker2"));
var _input = _interopRequireDefault(require("@alifd/next/lib/input"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _react = _interopRequireDefault(require("react"));
//这是共用控件类型组件
var BizItem = /*#__PURE__*/function (_React$Component) {
  (0, _inheritsLoose2["default"])(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["default"].createElement(_input["default"], {
          placeholder: placeholder
        });
      }
      if (componentType === 'DatePicker') {
        return /*#__PURE__*/_react["default"].createElement(_datePicker["default"], {
          placeholder: placeholder
        });
      }
      if (componentType === 'TextArea') {
        return /*#__PURE__*/_react["default"].createElement(_input["default"].TextArea, {
          placeholder: placeholder
        });
      }
      if (componentType === 'NumberPicker') {
        return /*#__PURE__*/_react["default"].createElement(_numberPicker["default"], null);
      }
      if (componentType === 'TimePicker') {
        return /*#__PURE__*/_react["default"].createElement(_timePicker["default"], {
          placeholder: placeholder
        });
      }
      if (componentType === 'Rating') {
        return /*#__PURE__*/_react["default"].createElement(_rating["default"], null);
      }
      if (componentType === 'Switch') {
        return /*#__PURE__*/_react["default"].createElement(_switch["default"], null);
      }
      return /*#__PURE__*/_react["default"].createElement(_input["default"], {
        placeholder: placeholder
      });
    };
    return _this;
  }
  var _proto = BizItem.prototype;
  _proto.render = function render() {
    return this.renderChild_();
  };
  return BizItem;
}(_react["default"].Component);
BizItem.dispalyName = 'BizItem';
var _default = BizItem;
exports["default"] = _default;