'use strict';

var classnames = require('classnames');
var neetoCist = require('@bigbinary/neeto-cist');
var Typography = require('@bigbinary/neetoui/Typography');
var jsxRuntime = require('react/jsx-runtime');

var CardLayout = function CardLayout(_ref) {
  var _ref$className = _ref.className,
    className = _ref$className === void 0 ? "" : _ref$className,
    icon = _ref.icon,
    _ref$containerClassNa = _ref.containerClassName,
    containerClassName = _ref$containerClassNa === void 0 ? "" : _ref$containerClassNa,
    _ref$title = _ref.title,
    title = _ref$title === void 0 ? null : _ref$title,
    _ref$description = _ref.description,
    description = _ref$description === void 0 ? null : _ref$description,
    actionBlock = _ref.actionBlock,
    children = _ref.children;
  return /*#__PURE__*/jsxRuntime.jsx("div", {
    "data-testid": "neeto-molecules-card-container",
    className: classnames(["neeto-molecules-card__container mx-auto w-full max-w-3xl", containerClassName]),
    children: /*#__PURE__*/jsxRuntime.jsxs("div", {
      "data-testid": "neeto-molecules-card",
      className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
      children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
        className: "neeto-molecules-card__content p-4 md:p-6",
        children: [icon && /*#__PURE__*/jsxRuntime.jsx("div", {
          className: "neeto-molecules-card__icon-wrapper mb-4 w-full text-start",
          children: icon
        }), title && /*#__PURE__*/jsxRuntime.jsx(Typography, {
          style: "h2",
          className: classnames(["mb-2", {
            "pb-2": neetoCist.isNotPresent(description)
          }]),
          children: title
        }), description && /*#__PURE__*/jsxRuntime.jsx(Typography, {
          className: "mb-4",
          style: "body1",
          children: description
        }), children]
      }), actionBlock && /*#__PURE__*/jsxRuntime.jsx("div", {
        className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6", className]),
        children: actionBlock
      })]
    })
  });
};

module.exports = CardLayout;
//# sourceMappingURL=CardLayout.js.map
