"use strict";

exports.__esModule = true;
exports.default = void 0;
var _slice2 = _interopRequireDefault(require("lodash/fp/slice"));
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _quickAccessCard = _interopRequireDefault(require("../quick-access-card"));
var _loader = _interopRequireDefault(require("../../atom/loader"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const QuickAccessCardGroup = props => {
  const {
    list = [],
    loading = false
  } = props;
  const loader = loading ? /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.loader
  }, /*#__PURE__*/_react.default.createElement(_loader.default, null)) : null;
  const cards = (0, _map2.default)(cardProps => {
    return /*#__PURE__*/_react.default.createElement("div", {
      className: _style.default.card,
      key: `card-${cardProps.feature}`
    }, /*#__PURE__*/_react.default.createElement(_quickAccessCard.default, cardProps));
  }, (0, _slice2.default)(0, 4, list));
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.group
  }, cards, loader);
};
QuickAccessCardGroup.propTypes = process.env.NODE_ENV !== "production" ? {
  list: _propTypes.default.arrayOf(_propTypes.default.shape(_quickAccessCard.default.propTypes)),
  loading: _propTypes.default.bool
} : {};
var _default = exports.default = QuickAccessCardGroup;
//# sourceMappingURL=index.js.map