import * as React from 'react';
import Empty from '../empty';
import { ConfigConsumer } from './';
import emptyImg from './empty.svg';

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

    switch (componentName) {
      case 'Table':
      case 'List':
        return React.createElement(Empty, {
          image: emptyImg,
          className: "".concat(prefix, "-normal")
        });

      case 'Select':
      case 'TreeSelect':
      case 'Cascader':
      case 'Transfer':
        return React.createElement(Empty, {
          image: emptyImg,
          className: "".concat(prefix, "-small")
        });

      default:
        return React.createElement(Empty, null);
    }
  });
};

export default renderEmpty;