const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
let dayjs = require("dayjs");
dayjs = require_runtime.__toESM(dayjs);
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
let _pisell_icon_es_DotsVertical = require("@pisell/icon/es/DotsVertical");
_pisell_icon_es_DotsVertical = require_runtime.__toESM(_pisell_icon_es_DotsVertical);
require("./index.less");
//#region src/components/booking/notes/NoteBlock/NoteItem/index.tsx
const NoteItem = (props) => {
	const defaultMenus = [{
		key: "edit",
		label: _pisell_utils.locales.getText("pisell2.text.status.edit-note")
	}, {
		key: "remove",
		label: _pisell_utils.locales.getText("pisell2.text.status.remove-note")
	}];
	const { isEdit, onChange, item, menus = defaultMenus } = props;
	const menuChange = (e) => {
		onChange === null || onChange === void 0 || onChange(item, e.key);
	};
	return /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__booking-notes-item" }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__booking-notes-item-note" }, item.content || "-", isEdit ? /* @__PURE__ */ react.default.createElement(antd.Dropdown, {
		menu: {
			items: menus,
			onClick: menuChange
		},
		placement: "bottomRight"
	}, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__booking-notes-menu-wrap" }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_DotsVertical.default, { className: "pisell-lowcode__booking-notes-menu-icon" }))) : null), item.created_at ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__booking-notes-item-date" }, _pisell_utils.locales.getText("pisell2.text.status.from-system-add"), " ", (0, dayjs.default)(item.created_at).format("HH:mm:ss DD/MM/YYYY")) : null);
};
//#endregion
exports.default = NoteItem;
