import React, { useContext } from 'react';
import Category from '../category';
import './index.less';
import { CdpContext } from '../../context';
var CategoryList = function CategoryList(_ref) {
  var onClick = _ref.onClick;
  var _useContext = useContext(CdpContext),
    categoryList = _useContext.categoryList;
  return /*#__PURE__*/React.createElement("div", {
    className: "cdp-category-list-panel"
  }, categoryList === null || categoryList === void 0 ? void 0 : categoryList.map(function (category) {
    return /*#__PURE__*/React.createElement(Category, {
      category: category,
      key: category.name,
      onClick: onClick
    });
  }));
};
export default CategoryList;