const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../Divider/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/productCard/components/Note/index.tsx
const prefix = "pisell-lowcode-";
const Note = (props) => {
	const { item, type, openNote, disabledEdit } = props;
	return (item === null || item === void 0 ? void 0 : item.note) || !disabledEdit ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index.default, { type }), /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${prefix}product-note-wrap`) }, (item === null || item === void 0 ? void 0 : item.note) ? /* @__PURE__ */ react.default.createElement("div", null, _pisell_utils.locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ react.default.createElement("span", {
		className: `${prefix}product-note-btn`,
		onClick: (e) => {
			e.preventDefault();
			e.stopPropagation();
			openNote();
		}
	}, (item === null || item === void 0 ? void 0 : item.note) ? _pisell_utils.locales.getText("pisell2.product.card.discount.edit.note") : _pisell_utils.locales.getText("pisell2.product.card.discount.add.note")) : null)) : null;
};
//#endregion
exports.default = Note;
