import Divider from "../Divider/index.js";
import React from "react";
import { locales } from "@pisell/utils";
import classNames from "classnames";
import "./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.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, { type }), /* @__PURE__ */ React.createElement("div", { className: classNames(`${prefix}product-note-wrap`) }, (item === null || item === void 0 ? void 0 : item.note) ? /* @__PURE__ */ React.createElement("div", null, locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ React.createElement("span", {
		className: `${prefix}product-note-btn`,
		onClick: (e) => {
			e.preventDefault();
			e.stopPropagation();
			openNote();
		}
	}, (item === null || item === void 0 ? void 0 : item.note) ? locales.getText("pisell2.product.card.discount.edit.note") : locales.getText("pisell2.product.card.discount.add.note")) : null)) : null;
};
//#endregion
export { Note as default };
