import { useEventDetail } from "../../../../Sales/Event/Detail.js";
import PisellResourceCard from "../../resourceDisplay/index.js";
import OpenCard_default from "../../OpenCard/index.js";
import React from "react";
//#region src/components/eventBooking/components/bookingDetailModal/components/Resource.tsx
const Resource = (props) => {
	const { detail } = useEventDetail();
	const resource = (detail === null || detail === void 0 ? void 0 : detail.resource) || [];
	return /* @__PURE__ */ React.createElement(OpenCard_default, {
		showBorder: true,
		showArrow: false,
		showHeader: false,
		className: "detail-resource-wrap"
	}, resource === null || resource === void 0 ? void 0 : resource.map((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((i) => {
			return /* @__PURE__ */ React.createElement(PisellResourceCard, {
				key: i.id,
				dataSource: i,
				showSubtitle: false,
				isClickable: false
			});
		}));
	}));
};
//#endregion
export { Resource as default };
