import dayjs from "dayjs";
import React from "react";
import { Dropdown } from "antd";
import { locales } from "@pisell/utils";
import DotsVertical from "@pisell/icon/es/DotsVertical";
import "./index.less";
//#region src/components/booking/notes/NoteBlock/NoteItem/index.tsx
const NoteItem = (props) => {
	const defaultMenus = [{
		key: "edit",
		label: locales.getText("pisell2.text.status.edit-note")
	}, {
		key: "remove",
		label: 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.createElement("div", { className: "pisell-lowcode__booking-notes-item" }, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-notes-item-note" }, item.content || "-", isEdit ? /* @__PURE__ */ React.createElement(Dropdown, {
		menu: {
			items: menus,
			onClick: menuChange
		},
		placement: "bottomRight"
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-notes-menu-wrap" }, /* @__PURE__ */ React.createElement(DotsVertical, { className: "pisell-lowcode__booking-notes-menu-icon" }))) : null), item.created_at ? /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-notes-item-date" }, locales.getText("pisell2.text.status.from-system-add"), " ", dayjs(item.created_at).format("HH:mm:ss DD/MM/YYYY")) : null);
};
//#endregion
export { NoteItem as default };
