const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../../index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/productCard/cartSkuCard/components/Note/index.tsx
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(antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${require_index.PREFIX}__note-wrap`) }, (item === null || item === void 0 ? void 0 : item.note) ? /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`${require_index.PREFIX}__note-text`) }, _pisell_utils.locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ react.default.createElement("span", {
		className: `${require_index.PREFIX}__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;
