"use strict";
const common_vendor = require("../../../../../common/vendor.js");
require("../../../../adapter-vue.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "message-revoked",
  props: {
    isEdit: {
      type: Boolean,
      default: () => false
    },
    messageItem: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["messageEdit"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const message = common_vendor.ref();
    const isEditMsg = common_vendor.ref(false);
    const emits = __emit;
    common_vendor.watchEffect(() => {
      message.value = props.messageItem;
      isEditMsg.value = props.isEdit;
    });
    const messageEdit = () => {
      emits("messageEdit");
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.unref(message).flow === "in"
      }, common_vendor.unref(message).flow === "in" ? {
        b: common_vendor.t(common_vendor.unref(message).nick || common_vendor.unref(message).from)
      } : common_vendor.unref(message).from === common_vendor.unref(message).revoker ? {
        d: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.您"))
      } : {
        e: common_vendor.t(common_vendor.unref(message).revoker)
      }, {
        c: common_vendor.unref(message).from === common_vendor.unref(message).revoker,
        f: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.撤回了一条消息")),
        g: common_vendor.unref(message).flow === "out" && common_vendor.unref(isEditMsg)
      }, common_vendor.unref(message).flow === "out" && common_vendor.unref(isEditMsg) ? {
        h: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.重新编辑")),
        i: common_vendor.o$1(messageEdit)
      } : {});
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e1a956f2"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/message-tool/message-revoked.js.map
