import React from "react";
import { Popover, Skeleton } from "antd";
import { locales } from "@pisell/utils";
import "./index.less";
//#region src/components/schedules/components/ResourceList/index.tsx
const ResourceList = (props) => {
	const { dataSource, loading, onClick } = props;
	const goResourceItem = (item) => {
		onClick === null || onClick === void 0 || onClick(item);
	};
	return /* @__PURE__ */ React.createElement(Skeleton, {
		active: true,
		round: true,
		loading
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__resource-list" }, dataSource.map((item) => {
		return /* @__PURE__ */ React.createElement("div", {
			className: "pisell-lowcode__resource-list-item",
			key: item.id,
			onClick: () => {
				goResourceItem(item);
			}
		}, /* @__PURE__ */ React.createElement(Popover, { content: locales.getText("pisell2.text.products.edit-resource-message") }, /* @__PURE__ */ React.createElement("span", { className: "pisell-lowcode__resource-list-item-title" }, item.title)));
	})));
};
//#endregion
export { ResourceList as default };
