"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vmNodata = _interopRequireDefault(require("../vm-nodata"));
require("./style");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 *  暂无数据
 *  type：展示类型  charts--图表  data--数据
 */

function VMEmpty(props) {
  var _ref = props || {},
    _ref$type = _ref.type,
    type = _ref$type === void 0 ? 'data' : _ref$type,
    _ref$text = _ref.text,
    text = _ref$text === void 0 ? '暂无数据！' : _ref$text,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    _ref$imgStyle = _ref.imgStyle,
    imgStyle = _ref$imgStyle === void 0 ? {} : _ref$imgStyle;
  var P = {
    charts: 'chart',
    chart: 'chart',
    data: 'default'
  };
  var imgUrl = P[type] || 'default';
  return /*#__PURE__*/_react["default"].createElement("div", {
    style: style,
    className: "empty"
  }, /*#__PURE__*/_react["default"].createElement(_vmNodata["default"], {
    type: imgUrl,
    className: "imgIcon",
    style: imgStyle
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "text"
  }, text));
}
var _default = exports["default"] = VMEmpty;
//# sourceMappingURL=index.js.map
