"use strict";

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

function MyEmpty(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,
    darkCockpit = _ref.darkCockpit,
    _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: _chartEmpty["default"],
    data: _dataEmpty["default"]
  };
  var imgUrl = P[type] || _dataEmpty["default"];
  var classnames = function classnames(name) {
    if (name) {
      return "ol-map-MyEmpty-".concat(name);
    }
    return "ol-map-MyEmpty";
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(classnames('MyEmpty'), " ").concat(darkCockpit && classnames('MyEmptyCockpit')),
    style: style
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: imgUrl,
    className: classnames('imgIcon'),
    style: imgStyle
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: classnames('text')
  }, text));
}
var _default = exports["default"] = MyEmpty;
//# sourceMappingURL=index.js.map
