/*
 * @Author: your name
 * @Date: 2021-09-17 13:39:58
 * @LastEditTime: 2021-09-17 13:40:08
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /fle-ui-next/components/config-provider/renderEmpty.tsx
 */
import * as React from 'react';
import Empty from '../empty';
import { ConfigConsumer } from '.';

var renderEmpty = function renderEmpty(componentName) {
  return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {
    var getPrefixCls = _ref.getPrefixCls;
    var prefix = getPrefixCls('empty');

    switch (componentName) {
      case 'Table':
      case 'List':
        return /*#__PURE__*/React.createElement(Empty, {
          image: Empty.PRESENTED_IMAGE_SIMPLE
        });

      case 'Select':
      case 'TreeSelect':
      case 'Cascader':
      case 'Transfer':
      case 'Mentions':
        return /*#__PURE__*/React.createElement(Empty, {
          image: Empty.PRESENTED_IMAGE_SIMPLE,
          className: "".concat(prefix, "-small")
        });

      default:
        return /*#__PURE__*/React.createElement(Empty, null);
    }
  });
};

export default renderEmpty;