"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _core = require("@emotion/core");

var _Card = _interopRequireDefault(require("@material-ui/core/Card"));

var _CardActions = _interopRequireDefault(require("@material-ui/core/CardActions"));

var _CardContent = _interopRequireDefault(require("@material-ui/core/CardContent"));

var _shortid = require("shortid");

var _cardMetaTypes = _interopRequireDefault(require("./cardMetaTypes"));

var _CivicCardLink = _interopRequireDefault(require("./CivicCardLink"));

var _ = require("../..");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function CivicCardLayoutPreview(_ref) {
  var cardMeta = _ref.cardMeta;
  return (0, _core.jsx)(_Card["default"], null, (0, _core.jsx)(_CardContent["default"], null, (0, _core.jsx)("h2", null, cardMeta.title), (0, _core.jsx)("p", null, cardMeta.introText), (0, _core.jsx)("section", {
    id: "".concat(cardMeta.slug, "-tags")
  }, cardMeta.tags.map(function (tag, index) {
    return (0, _core.jsx)(_.Chip, {
      tag: tag,
      index: index,
      key: (0, _shortid.generate)()
    });
  }))), (0, _core.jsx)(_CardActions["default"], null, (0, _core.jsx)(_CivicCardLink["default"], {
    slug: cardMeta.slug
  }, "Learn more")));
}

CivicCardLayoutPreview.propTypes = {
  cardMeta: _cardMetaTypes["default"]
};
CivicCardLayoutPreview.displayName = "CivicCardLayoutPreview";
var _default = CivicCardLayoutPreview;
exports["default"] = _default;