"use strict";

exports.__esModule = true;
exports.default = void 0;

require("core-js/modules/es6.object.assign");

require("core-js/modules/web.dom.iterable");

require("core-js/modules/es6.array.iterator");

require("core-js/modules/es6.object.keys");

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var IconContent = function IconContent(props) {
  var actionNode = props.actionNode,
      className = props.className,
      icon = props.icon,
      isProtected = props.isProtected,
      loading = props.loading,
      subtitle = props.subtitle,
      title = props.title,
      otherProps = _objectWithoutPropertiesLoose(props, ["actionNode", "className", "icon", "isProtected", "loading", "subtitle", "title"]);

  return _react.default.createElement("div", null, _react.default.createElement("div", _extends({
    className: 'cui-content-file' + ("" + (className && " " + className || ''))
  }, otherProps), !isProtected && actionNode && _react.default.createElement("div", {
    className: "cui-content-file__icon"
  }, actionNode), _react.default.createElement("span", null, _react.default.createElement("i", {
    className: "icon " + icon
  }))), _react.default.createElement("div", {
    className: "cui-content-file__info-container"
  }, _react.default.createElement("span", {
    className: "cui-content-file__title"
  }, loading ? 'Loading' : title), _react.default.createElement("span", {
    className: "cui-content-file__subtitle"
  }, " ", subtitle, " ")));
};

IconContent.defaultProps = {
  actionNode: null,
  className: '',
  icon: '',
  isProtected: null,
  loading: false,
  subtitle: '',
  title: ''
};
IconContent.propTypes = {
  actionNode: _propTypes.default.node,
  className: _propTypes.default.string,
  icon: _propTypes.default.string,
  isProtected: _propTypes.default.bool,
  loading: _propTypes.default.bool,
  subtitle: _propTypes.default.string,
  title: _propTypes.default.string
};
IconContent.displayName = 'IconContent';
var _default = IconContent;
exports.default = _default;