import _Avatar from "@alifd/next/es/avatar";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["children", "type", "text", "size", "shape", "icon", "src", "alt", "color", "backgroundColor", "srcSet"];
/* eslint-disable @typescript-eslint/no-shadow */
import * as React from 'react';
import "./index.less";
// import InfiniteScroll from 'react-infinite-scroll-component';

var myAvatar = function myAvatar(_ref) {
  var children = _ref.children,
    type = _ref.type,
    text = _ref.text,
    size = _ref.size,
    shape = _ref.shape,
    icon = _ref.icon,
    src = _ref.src,
    alt = _ref.alt,
    color = _ref.color,
    backgroundColor = _ref.backgroundColor,
    srcSet = _ref.srcSet,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  return type === '图标' ? /*#__PURE__*/React.createElement(_Avatar, {
    size: size,
    shape: shape,
    icon: icon,
    style: {
      color: color,
      backgroundColor: backgroundColor
    }
  }) : type === '图片' ? /*#__PURE__*/React.createElement(_Avatar, {
    size: size,
    shape: shape,
    src: src,
    style: {
      color: color,
      backgroundColor: backgroundColor
    }
  }) : /*#__PURE__*/React.createElement(_Avatar, {
    size: size,
    shape: shape,
    style: {
      color: color,
      backgroundColor: backgroundColor
    }
  }, text);
};
myAvatar.displayName = 'myAvatar';
export default myAvatar;