const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_utils = require("../../utils.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
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/products/list/ProductItem/index.tsx
const ProductItem = ({ item, onClickItem, layout = "all" }) => {
	return /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-lowcode__schedules-component-products-item",
		key: item.id,
		onClick: () => {
			onClickItem(item);
		}
	}, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__schedules-component-products-item-left" }, layout === "day" ? /* @__PURE__ */ react.default.createElement("div", {
		className: "tag",
		style: { background: require_utils.getScheduleColors(item["schedules"]) }
	}) : null, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__schedules-component-products-item-title" }, item.title)), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__schedules-component-products-item-right" }, layout === "day" ? /* @__PURE__ */ react.default.createElement("div", { className: "hours" }, item._schedules.str) : null, layout === "day" || require_utils.getUsableSchedules(item._schedules) ? null : /* @__PURE__ */ react.default.createElement(antd.Popover, { content: _pisell_utils.locales.getText("pisell2.text.products.no-current-schedule") }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_AlertCircle.default, { className: "pisell-lowcode__schedules-component-products-item-icon" }))));
};
//#endregion
exports.default = ProductItem;
