import useEngineContext from "../../../../../hooks/useEngineContext.js";
import React from "react";
import { Tooltip } from "antd";
import XClose from "@pisell/icon/es/XClose";
import AlertCircle from "@pisell/icon/es/AlertCircle";
import "./index.less";
//#region src/components/schedules/components/ScheduleList/RenderScheduleItem/index.tsx
const RenderScheduleItem = ({ item, onItemClick, onDelete, showDeleteIcon }) => {
	var _appHelper$utils;
	const { appHelper } = useEngineContext();
	return /* @__PURE__ */ React.createElement("div", {
		key: item.id,
		className: "pisell-lowcode__schedule-list-item",
		onClick: () => onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item)
	}, /* @__PURE__ */ React.createElement("div", {
		className: "pisell-lowcode__schedule-list-item-color",
		style: { backgroundColor: item.color }
	}), /* @__PURE__ */ React.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.createElement(Tooltip, { title: "Days conflict with another schedule" }, /* @__PURE__ */ React.createElement(AlertCircle, { className: "pisell-lowcode__schedule-list-item-conflict" })), showDeleteIcon && /* @__PURE__ */ React.createElement(XClose, {
		className: "pisell-lowcode__schedule-list-item-delete",
		onClick: (e) => {
			e.stopPropagation();
			onDelete === null || onDelete === void 0 || onDelete(item);
		}
	}));
};
//#endregion
export { RenderScheduleItem as default };
