'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/thin-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 _ThinCardTitle = require('./ThinCardTitle');

var _ThinCardTitle2 = _interopRequireDefault(_ThinCardTitle);

var _ThinCardPrimaryAction = require('./ThinCardPrimaryAction');

var _ThinCardPrimaryAction2 = _interopRequireDefault(_ThinCardPrimaryAction);

var _ThinCardActionButton = require('./ThinCardActionButton');

var _ThinCardActionButton2 = _interopRequireDefault(_ThinCardActionButton);

var _ThinCardWidget = require('./ThinCardWidget');

var _ThinCardWidget2 = _interopRequireDefault(_ThinCardWidget);

var _ThinCardDrawer = require('./ThinCardDrawer');

var _ThinCardDrawer2 = _interopRequireDefault(_ThinCardDrawer);

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

var ThinCard = function ThinCard(props) {
  var children = props.children,
      className = props.className,
      drawer = props.drawer,
      folder = props.folder,
      border = props.border,
      rest = _objectWithoutProperties(props, ['children', 'className', 'drawer', 'folder', 'border']);

  return _react2.default.createElement(
    _flexboxReact2.default,
    _extends({}, rest, {
      flexDirection: 'column',
      className: (0, _classnames2.default)('octagon', 'thincard__row', { thincard__noborder: !border, thincard__folderpad: folder }, className)
    }),
    folder ? _react2.default.createElement('div', { className: 'topedge' }) : '',
    _react2.default.createElement(
      _flexboxReact2.default,
      { flexDirection: 'row', flexGrow: 3, className: 'primary-content' },
      children
    ),
    drawer
  );
};
ThinCard.Title = _ThinCardTitle2.default;
ThinCard.PrimaryAction = _ThinCardPrimaryAction2.default;
ThinCard.ActionButton = _ThinCardActionButton2.default;
ThinCard.Widget = _ThinCardWidget2.default;
ThinCard.Drawer = _ThinCardDrawer2.default;
ThinCard.defaultProps = {
  folder: false,
  border: false
};
ThinCard.propTypes = {
  folder: _propTypes2.default.bool,
  border: _propTypes2.default.bool
};
exports.default = ThinCard;
//# sourceMappingURL=ThinCard.js.map