import _slice from "lodash/fp/slice";
import _map from "lodash/fp/map";
import React from 'react';
import PropTypes from 'prop-types';
import QuickAccessCard from '../quick-access-card';
import Loader from '../../atom/loader';
import style from './style.css';
const QuickAccessCardGroup = props => {
  const {
    list = [],
    loading = false
  } = props;
  const loader = loading ? /*#__PURE__*/React.createElement("div", {
    className: style.loader
  }, /*#__PURE__*/React.createElement(Loader, null)) : null;
  const cards = _map(cardProps => {
    return /*#__PURE__*/React.createElement("div", {
      className: style.card,
      key: `card-${cardProps.feature}`
    }, /*#__PURE__*/React.createElement(QuickAccessCard, cardProps));
  }, _slice(0, 4, list));
  return /*#__PURE__*/React.createElement("div", {
    className: style.group
  }, cards, loader);
};
QuickAccessCardGroup.propTypes = process.env.NODE_ENV !== "production" ? {
  list: PropTypes.arrayOf(PropTypes.shape(QuickAccessCard.propTypes)),
  loading: PropTypes.bool
} : {};
export default QuickAccessCardGroup;
//# sourceMappingURL=index.js.map