"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = void 0;
var _react = _interopRequireDefault(require("react")),
  _propTypes = _interopRequireDefault(require("prop-types")),
  _amosIcon = _interopRequireDefault(require("amos-icon")),
  _classnames = _interopRequireDefault(require("classnames"));

function _interopRequireDefault(e) {
  return e && e.__esModule ? e : {
    default: e
  }
}
var EleCatalog = function(e) {
  var t = e.icon,
    a = void 0 === t ? "file-tree" : t,
    r = e.onClick,
    l = e.tip,
    t = e.useImg,
    e = void 0 !== t && t,
    t = (0, _classnames.default)({
      "ele-catalog-operator": !0,
      "use-amos-icon": !e
    });
  return _react.default.createElement("div", {
    className: t,
    onClick: r,
    title: l
  }, e && _react.default.createElement("img", {
    src: a,
    alt: ""
  }), !e && _react.default.createElement(_amosIcon.default, {
    icon: a
  }))
};
EleCatalog.displayName = "EleCatalog", EleCatalog.propTypes = {
  icon: _propTypes.default.string,
  onClick: _propTypes.default.func,
  tip: _propTypes.default.string,
  useImg: _propTypes.default.bool
};
var _default = EleCatalog;
exports.default = EleCatalog, module.exports = exports.default;
