import React from 'react';
import OpenCard from "../../OpenCard";
import ResourceDisplay from "../../resourceDisplay";
import { useEventDetail } from "../../../../Sales";
var Resource = function Resource(props) {
  var _useEventDetail = useEventDetail(),
    detail = _useEventDetail.detail;

  // 教师
  var resource = (detail === null || detail === void 0 ? void 0 : detail.resource) || [];
  return /*#__PURE__*/React.createElement(OpenCard, {
    showBorder: true,
    showArrow: false,
    showHeader: false,
    className: "detail-resource-wrap"
  }, resource === null || resource === void 0 ? void 0 : resource.map(function (item, index) {
    var _item$children;
    return /*#__PURE__*/React.createElement("div", {
      key: index,
      className: "item"
    }, /*#__PURE__*/React.createElement("span", {
      className: "title"
    }, item.title), (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.map(function (i) {
      return /*#__PURE__*/React.createElement(ResourceDisplay, {
        key: i.id,
        dataSource: i,
        showSubtitle: false,
        isClickable: false
      });
    }));
  }));
};
export default Resource;