import "core-js/modules/es6.object.assign";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.keys";

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; }

import React from 'react';
import PropTypes from 'prop-types';

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.createElement("div", null, React.createElement("div", _extends({
    className: 'cui-content-file' + ("" + (className && " " + className || ''))
  }, otherProps), !isProtected && actionNode && React.createElement("div", {
    className: "cui-content-file__icon"
  }, actionNode), React.createElement("span", null, React.createElement("i", {
    className: "icon " + icon
  }))), React.createElement("div", {
    className: "cui-content-file__info-container"
  }, React.createElement("span", {
    className: "cui-content-file__title"
  }, loading ? 'Loading' : title), React.createElement("span", {
    className: "cui-content-file__subtitle"
  }, " ", subtitle, " ")));
};

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