'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

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

require('../../styles/components/large-card.css');

var _flexboxReact = require('flexbox-react');

var _flexboxReact2 = _interopRequireDefault(_flexboxReact);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _LargeCardAction = require('./LargeCardAction');

var _LargeCardAction2 = _interopRequireDefault(_LargeCardAction);

var _LargeCardClose = require('./LargeCardClose');

var _LargeCardClose2 = _interopRequireDefault(_LargeCardClose);

var _LargeCardContent = require('./LargeCardContent');

var _LargeCardContent2 = _interopRequireDefault(_LargeCardContent);

var _LargeCardGutter = require('./LargeCardGutter');

var _LargeCardGutter2 = _interopRequireDefault(_LargeCardGutter);

var _LargeCardKeyValue = require('./LargeCardKeyValue');

var _LargeCardKeyValue2 = _interopRequireDefault(_LargeCardKeyValue);

var _LargeCardRecentList = require('./LargeCardRecentList');

var _LargeCardRecentList2 = _interopRequireDefault(_LargeCardRecentList);

var _LargeCardStat = require('./LargeCardStat');

var _LargeCardStat2 = _interopRequireDefault(_LargeCardStat);

var _LargeCardTitle = require('./LargeCardTitle');

var _LargeCardTitle2 = _interopRequireDefault(_LargeCardTitle);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

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

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

/**
 * A Large Card component that can contain several context-specific components
 * to display information and statuses.
 */
var LargeCard = function LargeCard(props) {
  var children = props.children,
      className = props.className,
      framed = props.framed,
      showCard = props.showCard,
      style = props.style,
      rest = _objectWithoutProperties(props, ['children', 'className', 'framed', 'showCard', 'style']);

  return _react2.default.createElement(
    _flexboxReact2.default,
    _extends({
      className: (0, _classnames2.default)('octagon', 'large_card', showCard && 'is-fullview-open', className)
    }, rest),
    _react2.default.createElement(
      _flexboxReact2.default,
      {
        flexDirection: 'row',
        flexGrow: 3,
        className: (0, _classnames2.default)('large_card__container', framed && 'framed')
      },
      children
    )
  );
};

LargeCard.Action = _LargeCardAction2.default;
LargeCard.Close = _LargeCardClose2.default;
LargeCard.Gutter = _LargeCardGutter2.default;
LargeCard.Content = _LargeCardContent2.default;
LargeCard.KeyValue = _LargeCardKeyValue2.default;
LargeCard.RecentList = _LargeCardRecentList2.default;
LargeCard.Title = _LargeCardTitle2.default;
LargeCard.Stat = _LargeCardStat2.default;

LargeCard.defaultProps = {
  framed: false,
  showCard: false
};
LargeCard.propTypes = {
  /**
   * Pad the card inside of a gray border
   */
  framed: _propTypes2.default.bool,
  /**
   * Render the card
   * @deprecated Rendering will be the default mode in the future.  Components
   * controlling their own complete render state is an antipattern
   */
  showCard: _propTypes2.default.bool
};
exports.default = LargeCard;
//# sourceMappingURL=LargeCard.js.map