import React from 'react';
import { d as _objectWithoutProperties, e as _extends } from '../_rollupPluginBabelHelpers-539c1155.js';
import PropTypes from 'prop-types';
import 'styled-components';
import '@styled-system/space';
import '@styled-system/color';
import '@styled-system/border';
import '@styled-system/variant';
import '@styled-system/typography';
import Text from './text.js';
import '@styled-system/layout';
import '@styled-system/flexbox';
import '@styled-system/position';
import '@styled-system/shadow';
import Box from './box.js';

var Card = function Card(_ref) {
  var heading = _ref.heading,
      children = _ref.children,
      rest = _objectWithoutProperties(_ref, ["heading", "children"]);

  return React.createElement(Box, _extends({
    flexDirection: "column",
    alignItems: "flex-start",
    "data-testid": "card-container"
  }, rest), heading && React.createElement(Text, {
    variant: "h3.semi-bold",
    color: "black.haptik",
    "data-testid": "card-heading"
  }, heading), React.createElement(Box, {
    padding: "zero",
    borderRadius: "4px",
    borderWidth: "1px",
    border: "1px solid #D5D5D5",
    marginTop: heading ? "14px" : "0px",
    overflow: "hidden",
    "data-testid": "card-inner-container"
  }, children));
};

Card.propTypes = {
  heading: PropTypes.string,
  children: PropTypes.node || PropTypes.string
};
Card.defaultProps = {
  heading: "",
  children: ""
};
Card.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "Card",
  "props": {
    "heading": {
      "defaultValue": {
        "value": "\"\"",
        "computed": false
      },
      "type": {
        "name": "string"
      },
      "required": false,
      "description": ""
    },
    "children": {
      "defaultValue": {
        "value": "\"\"",
        "computed": false
      },
      "type": {
        "name": "custom",
        "raw": "PropTypes.node || PropTypes.string"
      },
      "required": false,
      "description": ""
    }
  }
};

export default Card;
