"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

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

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

var _CardContent = _interopRequireDefault(require("./CardContent"));

var _CardWrapper = _interopRequireDefault(require("./CardWrapper"));

function Card(_ref) {
  var children = _ref.children,
      wrapped = _ref.wrapped,
      wrapperClassName = _ref.wrapperClassName,
      props = (0, _objectWithoutProperties2.default)(_ref, ["children", "wrapped", "wrapperClassName"]);

  var card = _react.default.createElement(_CardContent.default, props, children);

  return wrapped ? _react.default.createElement(_CardWrapper.default, {
    className: wrapperClassName
  }, card) : card;
}

Card.propTypes = {
  children: _propTypes.default.node.isRequired,
  className: _propTypes.default.string,
  wrapperClassName: _propTypes.default.string,
  wrapped: _propTypes.default.bool
};
Card.defaultProps = {
  wrapped: false,
  className: null,
  wrapperClassName: null
};