const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_useEngineContext = require("../../../../../hooks/useEngineContext.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_icon_es_XClose = require("@pisell/icon/es/XClose");
_pisell_icon_es_XClose = require_runtime.__toESM(_pisell_icon_es_XClose);
let _pisell_icon_es_AlertCircle = require("@pisell/icon/es/AlertCircle");
_pisell_icon_es_AlertCircle = require_runtime.__toESM(_pisell_icon_es_AlertCircle);
require("./index.less");
//#region src/components/schedules/components/ScheduleList/RenderScheduleItem/index.tsx
const RenderScheduleItem = ({ item, onItemClick, onDelete, showDeleteIcon }) => {
	var _appHelper$utils;
	const { appHelper } = require_useEngineContext.default();
	return /* @__PURE__ */ react.default.createElement("div", {
		key: item.id,
		className: "pisell-lowcode__schedule-list-item",
		onClick: () => onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item)
	}, /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-lowcode__schedule-list-item-color",
		style: { backgroundColor: item.color }
	}), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__schedule-list-item-content" }, appHelper === null || appHelper === void 0 || (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.translationShop(item.name)), item.conflict && /* @__PURE__ */ react.default.createElement(antd.Tooltip, { title: "Days conflict with another schedule" }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_AlertCircle.default, { className: "pisell-lowcode__schedule-list-item-conflict" })), showDeleteIcon && /* @__PURE__ */ react.default.createElement(_pisell_icon_es_XClose.default, {
		className: "pisell-lowcode__schedule-list-item-delete",
		onClick: (e) => {
			e.stopPropagation();
			onDelete === null || onDelete === void 0 || onDelete(item);
		}
	}));
};
//#endregion
exports.default = RenderScheduleItem;
