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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

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

import { mapToCssModules, omit, pick, TransitionPropTypeKeys, TransitionTimeouts, tagPropType } from './Shared/helper.js';
//
import CCard from './CCard';
//import CProgress from './CProgress';
import CCardBody from './CCardBody';
import CCardHeader from './CCardHeader';
import CCardFooter from './CCardFooter';
import Slot from './Shared/Slot.js';
import CCol from './CCol';

//component - CoreUI / CWidget3

var CWidgetBrand = function CWidgetBrand(props) {
  var children = props.children,
      className = props.className,
      cssModule = props.cssModule,
      dataBox = props.dataBox,
      color = props.color,
      rightHeader = props.rightHeader,
      rightFooter = props.rightFooter,
      leftHeader = props.leftHeader,
      leftFooter = props.leftFooter,
      addHeaderClasses = props.addHeaderClasses,
      bodySlot = props.bodySlot,
      attributes = _objectWithoutProperties(props, ['children', 'className', 'cssModule', 'dataBox', 'color', 'rightHeader', 'rightFooter', 'leftHeader', 'leftFooter', 'addHeaderClasses', 'bodySlot']);

  // render

  var classes = mapToCssModules(classNames(className, "content-center text-white p-0", color ? 'bg-' + color : '', addHeaderClasses), cssModule);

  return React.createElement(
    CCard,
    _extends({}, attributes, { custom: true }),
    React.createElement(
      CCardHeader,
      {
        className: classes
      },
      React.createElement(Slot, { content: children })
    ),
    React.createElement(
      Slot,
      { content: bodySlot },
      React.createElement(
        CCardBody,
        { className: 'row text-center' },
        React.createElement(
          CCol,
          null,
          rightHeader ? React.createElement(
            'div',
            { className: 'text-value-lg' },
            rightHeader
          ) : '',
          rightFooter ? React.createElement(
            'div',
            { className: 'text-uppercase text-muted small' },
            rightFooter
          ) : ''
        ),
        React.createElement('div', { className: 'c-vr' }),
        React.createElement(
          CCol,
          null,
          leftHeader ? React.createElement(
            'div',
            { className: 'text-value-lg' },
            rightHeader
          ) : '',
          leftFooter ? React.createElement(
            'div',
            { className: 'text-uppercase text-muted small' },
            rightFooter
          ) : ''
        )
      )
    )
  );
};

CWidgetBrand.propTypes = process.env.NODE_ENV !== "production" ? {
  children: PropTypes.node,
  className: PropTypes.string,
  cssModule: PropTypes.object,
  //
  innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
  dataBox: PropTypes.func,
  //old
  color: PropTypes.string,
  rightHeader: PropTypes.string,
  rightFooter: PropTypes.string,
  leftHeader: PropTypes.string,
  leftFooter: PropTypes.string,
  addHeaderClasses: PropTypes.oneOfType([String, Array, Object]),
  bodySlot: PropTypes.node
} : {};

CWidgetBrand.defaultProps = {
  dataBox: function dataBox() {
    return { variant: 'facebook', friends: '-', feeds: '-' };
  }
};

export default CWidgetBrand;