import React from 'react';

// 内库使用-start
import Skeleton from "./../../../Skeleton";
import Loading from "./../../../Loading";
// 内库使用-end

/* 测试使用-start
import { Skeleton, Loading } from 'seedsui-react'
测试使用-end */

// 暂无数据或者错误
var MainLoading = function MainLoading(_ref) {
  var type = _ref.type,
    loading = _ref.loading;
  if (typeof loading === 'function') {
    return loading({
      action: type
    });
  }
  if (type === 'load' || type === 'retry') {
    return /*#__PURE__*/React.createElement(Skeleton.List, {
      animated: false
    });
  }
  if (type === 'reload') {
    return /*#__PURE__*/React.createElement(Loading, {
      portal: document.getElementById('root') || document.body
    });
  }
  return null;
};
export default MainLoading;