"use strict";

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

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

require("lazysizes");

require("lazysizes/plugins/parent-fit/ls.parent-fit");

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

var Card = function Card(props) {
  var _props$categories;

  var category = (props === null || props === void 0 ? void 0 : props.categories) && (props === null || props === void 0 ? void 0 : (_props$categories = props.categories) === null || _props$categories === void 0 ? void 0 : _props$categories.filter(function (item) {
    return item.isDefault;
  })[0]);
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "wizrd-blog-box"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "wizrd-blog-img"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "wizrd-blog-img-inner"
  }, /*#__PURE__*/_react["default"].createElement("img", {
    "data-sizes": "auto",
    "data-src": props.image,
    "data-srcset": "\n            ".concat(props.image, " 600w,\n            ").concat(props.image, " 220w,\n            ").concat(props.image, " 300w,\n            ").concat(props.image, " 600w,\n            ").concat(props.image, " 900w,\n          "),
    alt: props.image,
    width: 200,
    height: 150,
    "class": "lazyload"
  }), /*#__PURE__*/_react["default"].createElement("span", {
    className: "wizrd-blog-category"
  }, (category === null || category === void 0 ? void 0 : category.name) || 'Other'))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "wizrd-blog-detail"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    "class": "wizrd-blog-detail-inner"
  }, props.children)));
};

var _default = Card;
exports["default"] = _default;