"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Card = void 0;
var _react = _interopRequireDefault(require("react"));
var _Padder = require("./Padder");
var _Box = require("./Box");
var _Banner = require("./Banner");
require("../styles/card.css");
var Card = function Card(_ref) {
  var children = _ref.children,
    title = _ref.title,
    text = _ref.text,
    width = _ref.width,
    height = _ref.height,
    image = _ref.image,
    imageHeight = _ref.imageHeight,
    direction = _ref.direction,
    parallax = _ref.parallax;
  var boxWidth = width ? width : '100%';
  var boxHeight = height ? height : 'inherit';
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "card",
    style: {
      width: boxWidth,
      minHeight: boxHeight
    }
  }, image && /*#__PURE__*/_react.default.createElement(_Banner.Banner, {
    height: imageHeight || 100,
    source: image,
    direction: direction,
    parallax: parallax,
    roundings: ['lefttop', 'righttop']
  }), /*#__PURE__*/_react.default.createElement(_Padder.Padder, {
    top: "1.5em",
    bottom: "1.5em",
    left: "2em",
    right: "2em"
  }, /*#__PURE__*/_react.default.createElement("h4", {
    style: {
      marginBottom: '0.5em'
    }
  }, title), text && /*#__PURE__*/_react.default.createElement("p", null, text), children));
};
exports.Card = Card;