import _Rating from "@alifd/next/es/rating";
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["type", "size", "disabled", "defaultValue", "value", "style"];
/* eslint-disable @typescript-eslint/no-shadow */
import * as React from 'react';
import "./index.scss";
var MyRating = function MyRating(_ref) {
  var type = _ref.type,
    size = _ref.size,
    disabled = _ref.disabled,
    defaultValue = _ref.defaultValue,
    value = _ref.value,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var _style = style || {};
  var _otherProps = otherProps || {};
  _otherProps.style = _style;
  var moren = function moren() {
    return /*#__PURE__*/React.createElement(_Rating, _extends({
      // className='moren'
      size: size,
      disabled: disabled,
      defaultValue: defaultValue,
      value: value
    }, _otherProps));
  };
  var difen = function difen() {
    return /*#__PURE__*/React.createElement(_Rating, _extends({
      // className='difen'
      size: size,
      disabled: disabled,
      defaultValue: defaultValue,
      value: value
    }, _otherProps));
  };
  var gaofen = function gaofen() {
    return /*#__PURE__*/React.createElement(_Rating, _extends({
      // className='gaofen'
      size: size,
      disabled: disabled,
      defaultValue: defaultValue,
      value: value
    }, _otherProps));
  };
  return function () {
    switch (type) {
      case "默认":
        return moren();
        break;
      case "低分":
        return difen();
        break;
      case "高分":
        return gaofen();
        break;
      default:
        return null;
    }
  }();
};
export default MyRating;