"use strict";
const common_vendor = require("../../../../common/vendor.js");
require("../../../adapter-vue.js");
const TUIKit_components_TUIChat_messageList_link_index = require("./link/index.js");
const TUIKit_plugins_pluginComponents_index = require("../../../plugins/plugin-components/index.js");
const TUIKit_components_common_Toast_index = require("../../common/Toast/index.js");
const TUIKit_components_TUIChat_utils_utils = require("../utils/utils.js");
const TUIKit_utils_lodash = require("../../../utils/lodash.js");
const TUIKit_utils_env = require("../../../utils/env.js");
const TUIKit_components_TUIChat_utils_chatStorage = require("../utils/chatStorage.js");
const TUIKit_components_common_Toast_type = require("../../common/Toast/type.js");
if (!Math) {
  (MessageGroupApplication + MessageTimestamp + MessageTip + MessageText + MessageImage + ProgressMessage + MessageVideo + MessageAudio + MessageRecord + MessageFile + MessageFace + MessageLocation + MessageCustom + MessageBubble + MessagePlugin + MessageRevoked + MessageTool + ScrollButton + Dialog + ReadReceiptPanel + SimpleMessageList + Drawer)();
}
const SimpleMessageList = () => "./message-elements/simple-message-list/index.js";
const MessageGroupApplication = () => "./message-group-application/index.js";
const MessageText = () => "./message-elements/message-text.js";
const MessageImage = () => "./message-elements/message-image.js";
const MessageAudio = () => "./message-elements/message-audio.js";
const MessageRecord = () => "./message-elements/message-record/index.js";
const MessageFile = () => "./message-elements/message-file.js";
const MessageFace = () => "./message-elements/message-face.js";
const MessageCustom = () => "./message-elements/message-custom.js";
const MessageTip = () => "./message-elements/message-tip.js";
const MessageBubble = () => "./message-elements/message-bubble.js";
const MessageLocation = () => "./message-elements/message-location.js";
const MessageTimestamp = () => "./message-elements/message-timestamp.js";
const MessageVideo = () => "./message-elements/message-video.js";
const MessageTool = () => "./message-tool/index.js";
const MessageRevoked = () => "./message-tool/message-revoked.js";
const MessagePlugin = () => "../../../plugins/plugin-components/message-plugin.js";
const ReadReceiptPanel = () => "./read-receipt-panel/index.js";
const ScrollButton = () => "./scroll-button/index.js";
const Dialog = () => "../../common/Dialog/index.js";
const Drawer = () => "../../common/Drawer/index.js";
const ProgressMessage = () => "../../common/ProgressMessage/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  props: {
    isGroup: { type: Boolean, default: false },
    groupID: { default: "" },
    isNotInGroup: { type: Boolean, default: false },
    isMultipleSelectMode: { type: Boolean, default: false }
  },
  emits: ["closeInputToolBar", "handleEditor", "toggleMultipleSelectMode"],
  setup(__props, { expose: __expose, emit: __emit }) {
    var _a;
    const emits = __emit;
    const props = __props;
    let selfAddValue = 0;
    let observer = null;
    let groupType;
    const sentReceiptMessageID = /* @__PURE__ */ new Set();
    const isOfficial = common_vendor.Jt.getData(common_vendor.o.APP, "isOfficial");
    const thisInstance = ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) || common_vendor.getCurrentInstance();
    const messageList = common_vendor.ref();
    const multipleSelectedMessageIDList = common_vendor.ref([]);
    const isCompleted = common_vendor.ref(false);
    const currentConversationID = common_vendor.ref("");
    const toggleID = common_vendor.ref("");
    const scrollTop = common_vendor.ref(5e3);
    const TYPES = common_vendor.ref(common_vendor.qt.TYPES);
    const isLoadingMessage = common_vendor.ref(false);
    const isLongpressing = common_vendor.ref(false);
    const blinkMessageIDList = common_vendor.ref([]);
    const messageTarget = common_vendor.ref();
    const scrollButtonInstanceRef = common_vendor.ref();
    const historyFirstMessageID = common_vendor.ref("");
    const isShowSimpleMessageList = common_vendor.ref(false);
    const simpleMessageListRenderMessageID = common_vendor.ref();
    const audioPlayedMapping = common_vendor.ref({});
    const broadcastNewAudioSrc = common_vendor.ref("");
    const readStatusMessage = common_vendor.ref();
    const isShowReadUserStatusPanel = common_vendor.ref(false);
    const reSendDialogShow = common_vendor.ref(false);
    const resendMessageData = common_vendor.ref();
    const scrollToBottom = () => {
      scrollTop.value += 300;
      const timer2 = setTimeout(() => {
        scrollTop.value += 1;
        clearTimeout(timer2);
      }, 300);
    };
    const onCurrentConversationIDUpdated = (conversationID) => {
      currentConversationID.value = conversationID;
      if (TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()) {
        const { groupProfile } = common_vendor.Jt.getConversationModel(conversationID) || {};
        groupType = groupProfile == null ? void 0 : groupProfile.type;
      }
      if (Object.keys(audioPlayedMapping.value).length > 0) {
        TUIKit_components_TUIChat_utils_chatStorage.chatStorage.setChatStorage("audioPlayedMapping", audioPlayedMapping.value);
      }
    };
    common_vendor.onMounted(() => {
      audioPlayedMapping.value = TUIKit_components_TUIChat_utils_chatStorage.chatStorage.getChatStorage("audioPlayedMapping") || {};
      common_vendor.Jt.watch(common_vendor.o.CHAT, {
        messageList: onMessageListUpdated,
        messageSource: onMessageSourceUpdated,
        isCompleted: onChatCompletedUpdated
      });
      common_vendor.Jt.watch(common_vendor.o.CONV, {
        currentConversationID: onCurrentConversationIDUpdated
      });
      common_vendor.v("messageList", thisInstance);
      common_vendor.index.$on("scroll-to-bottom", scrollToLatestMessage);
    });
    common_vendor.onUnmounted(() => {
      common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
        messageList: onMessageListUpdated,
        isCompleted: onChatCompletedUpdated
      });
      common_vendor.Jt.unwatch(common_vendor.o.CONV, {
        currentConversationID: onCurrentConversationIDUpdated
      });
      observer == null ? void 0 : observer.disconnect();
      observer = null;
      common_vendor.index.$off("scroll-to-bottom");
      if (Object.keys(audioPlayedMapping.value).length > 0) {
        TUIKit_components_TUIChat_utils_chatStorage.chatStorage.setChatStorage("audioPlayedMapping", audioPlayedMapping.value);
      }
    });
    const handelScrollListScroll = TUIKit_utils_lodash.throttle(
      function(e) {
        var _a2;
        (_a2 = scrollButtonInstanceRef.value) == null ? void 0 : _a2.judgeScrollOverOneScreen(e);
      },
      500,
      { leading: true }
    );
    function getGlobalAudioContext(audioMap, options) {
      if (options == null ? void 0 : options.newAudioSrc) {
        broadcastNewAudioSrc.value = options.newAudioSrc;
      }
    }
    async function onMessageListUpdated(list) {
      var _a2, _b, _c;
      observer == null ? void 0 : observer.disconnect();
      messageList.value = list.filter((message) => !message.isDeleted).map((message) => {
        message.vueForRenderKey = `${message.ID}`;
        return message;
      });
      const newLastMessage = (_b = messageList.value) == null ? void 0 : _b[((_a2 = messageList.value) == null ? void 0 : _a2.length) - 1];
      if (messageTarget.value) {
        scrollAndBlinkMessage(messageTarget.value);
      } else if (!isLoadingMessage.value && !(((_c = scrollButtonInstanceRef.value) == null ? void 0 : _c.isScrollButtonVisible) && (newLastMessage == null ? void 0 : newLastMessage.flow) === "in")) {
        common_vendor.nextTick$1(() => {
          scrollToBottom();
        });
      }
      if (TUIKit_components_TUIChat_utils_utils.isEnabledMessageReadReceiptGlobal()) {
        common_vendor.nextTick$1(() => bindIntersectionObserver());
      }
    }
    async function scrollToLatestMessage() {
      try {
        const { scrollHeight } = await common_vendor.P(
          "#messageScrollList",
          "messageList"
        );
        if (scrollHeight) {
          scrollTop.value === scrollHeight ? scrollTop.value = scrollHeight + 1 : scrollTop.value = scrollHeight;
        } else {
          scrollToBottom();
        }
      } catch (error) {
        scrollToBottom();
      }
    }
    async function onMessageSourceUpdated(message) {
      messageTarget.value = message;
      scrollAndBlinkMessage(messageTarget.value);
    }
    function scrollAndBlinkMessage(message) {
      var _a2;
      if ((_a2 = messageList.value) == null ? void 0 : _a2.some(
        (messageListItem) => (messageListItem == null ? void 0 : messageListItem.ID) === (message == null ? void 0 : message.ID)
      )) {
        common_vendor.nextTick$1(async () => {
          await scrollToTargetMessage(message);
          await blinkMessage(message == null ? void 0 : message.ID);
          messageTarget.value = void 0;
        });
      }
    }
    function onChatCompletedUpdated(flag) {
      isCompleted.value = flag;
    }
    const getHistoryMessageList = () => {
      var _a2, _b;
      isLoadingMessage.value = true;
      const currentFirstMessageID = ((_b = (_a2 = messageList.value) == null ? void 0 : _a2[0]) == null ? void 0 : _b.ID) || "";
      common_vendor.Qt.getMessageList().then(() => {
        common_vendor.nextTick$1(() => {
          historyFirstMessageID.value = currentFirstMessageID;
          const timer2 = setTimeout(() => {
            historyFirstMessageID.value = "";
            isLoadingMessage.value = false;
            clearTimeout(timer2);
          }, 500);
        });
      });
    };
    const openComplaintLink = () => {
    };
    const handleToggleMessageItem = (e, message, index, isLongpress = false) => {
      if (props.isMultipleSelectMode || props.isNotInGroup) {
        return;
      }
      if (isLongpress) {
        isLongpressing.value = true;
      }
      toggleID.value = message.ID;
    };
    let timer;
    const handleH5LongPress = (e, message, index, type) => {
      if (props.isMultipleSelectMode || props.isNotInGroup) {
        return;
      }
      if (!TUIKit_utils_env.isH5)
        return;
      function longPressHandler() {
        clearTimeout(timer);
        handleToggleMessageItem(e, message, index, true);
      }
      function touchStartHandler() {
        timer = setTimeout(longPressHandler, 500);
      }
      function touchEndHandler() {
        clearTimeout(timer);
      }
      switch (type) {
        case "touchstart":
          touchStartHandler();
          break;
        case "touchend":
          touchEndHandler();
          setTimeout(() => {
            isLongpressing.value = false;
          }, 200);
          break;
      }
    };
    const handleEdit = (message) => {
      emits("handleEditor", message, "reedit");
    };
    const resendMessage = (message) => {
      reSendDialogShow.value = true;
      resendMessageData.value = message;
    };
    const handleImagePreview = (index) => {
      if (!messageList.value) {
        return;
      }
      const imageMessageIndex = [];
      const imageMessageList = messageList.value.filter((item, index2) => {
        if (!item.isRevoked && !item.hasRiskContent && item.type === TYPES.value.MSG_IMAGE) {
          imageMessageIndex.push(index2);
          return true;
        }
        return false;
      });
      common_vendor.index.previewImage({
        current: imageMessageIndex.indexOf(index),
        urls: imageMessageList.map((message) => {
          var _a2;
          return (_a2 = message.payload.imageInfoArray) == null ? void 0 : _a2[2].url;
        })
      });
    };
    const resendMessageConfirm = () => {
      reSendDialogShow.value = !reSendDialogShow.value;
      const messageModel = resendMessageData.value;
      messageModel.resendMessage();
    };
    function blinkMessage(messageID) {
      return new Promise((resolve) => {
        const index = blinkMessageIDList.value.indexOf(messageID);
        if (index < 0) {
          blinkMessageIDList.value.push(messageID);
          const timer2 = setTimeout(() => {
            blinkMessageIDList.value.splice(
              blinkMessageIDList.value.indexOf(messageID),
              1
            );
            clearTimeout(timer2);
            resolve();
          }, 3e3);
        }
      });
    }
    function scrollTo(scrollHeight) {
      scrollTop.value = scrollHeight;
    }
    async function bindIntersectionObserver() {
      if (!messageList.value || messageList.value.length === 0) {
        return;
      }
      if (groupType === TYPES.value.GRP_AVCHATROOM || groupType === TYPES.value.GRP_COMMUNITY) {
        return;
      }
      observer == null ? void 0 : observer.disconnect();
      observer = common_vendor.index.createIntersectionObserver(thisInstance, {
        threshold: [0.7],
        observeAll: true
        // In Uni-app, the `safetip` is also included, so a negative margin is needed to exclude it.
      }).relativeTo("#messageScrollList", { top: -70 });
      observer == null ? void 0 : observer.observe(".message-li.in .message-bubble-container", (res) => {
        var _a2;
        if (sentReceiptMessageID.has(res.id)) {
          return;
        }
        const matchingMessage = messageList.value.find((message) => {
          return res.id.indexOf(message.ID) > -1;
        });
        if (matchingMessage && matchingMessage.needReadReceipt && matchingMessage.flow === "in" && !((_a2 = matchingMessage.readReceiptInfo) == null ? void 0 : _a2.isPeerRead)) {
          common_vendor.Qt.sendMessageReadReceipt([matchingMessage]);
          sentReceiptMessageID.add(res.id);
        }
      });
    }
    function setReadReceiptPanelVisible(visible, message) {
      if (visible && props.isNotInGroup) {
        return;
      }
      if (!visible) {
        readStatusMessage.value = void 0;
      } else {
        readStatusMessage.value = message;
      }
      isShowReadUserStatusPanel.value = visible;
    }
    async function scrollToTargetMessage(message) {
      const targetMessageID = message.ID;
      const isTargetMessageInScreen = messageList.value && messageList.value.some((msg) => msg.ID === targetMessageID);
      if (targetMessageID && isTargetMessageInScreen) {
        const timer2 = setTimeout(async () => {
          try {
            const scrollViewRect = await common_vendor.T(
              "#messageScrollList",
              "messageList"
            );
            const originalMessageRect = await common_vendor.T(
              "#tui-" + targetMessageID,
              "messageList"
            );
            const { scrollTop: scrollTop2 } = await common_vendor.P(
              "#messageScrollList",
              "messageList"
            );
            const finalScrollTop = originalMessageRect.top + scrollTop2 - scrollViewRect.top - selfAddValue++ % 2;
            scrollTo(finalScrollTop);
            clearTimeout(timer2);
          } catch (error) {
          }
        }, 500);
      } else {
        TUIKit_components_common_Toast_index.Toast({
          message: common_vendor.Wt.t("TUIChat.无法定位到原消息"),
          type: TUIKit_components_common_Toast_type.TOAST_TYPE.WARNING
        });
      }
    }
    function onMessageListBackgroundClick() {
      emits("closeInputToolBar");
    }
    common_vendor.watch(() => props.isMultipleSelectMode, (newValue) => {
      if (!newValue) {
        changeSelectMessageIDList({
          type: "clearAll",
          messageID: ""
        });
      }
    });
    function changeSelectMessageIDList({ type, messageID }) {
      if (type === "clearAll") {
        multipleSelectedMessageIDList.value = [];
      } else if (type === "add" && !multipleSelectedMessageIDList.value.includes(messageID)) {
        multipleSelectedMessageIDList.value.push(messageID);
      } else if (type === "remove") {
        multipleSelectedMessageIDList.value = multipleSelectedMessageIDList.value.filter((id) => id !== messageID);
      }
    }
    function mergeForwardMessage() {
      common_vendor.Jt.update(common_vendor.o.CUSTOM, "multipleForwardMessageID", {
        isMergeForward: true,
        messageIDList: multipleSelectedMessageIDList.value
      });
    }
    function oneByOneForwardMessage() {
      common_vendor.Jt.update(common_vendor.o.CUSTOM, "multipleForwardMessageID", {
        isMergeForward: false,
        messageIDList: multipleSelectedMessageIDList.value
      });
    }
    function assignMessageIDInUniapp(messageID) {
      simpleMessageListRenderMessageID.value = messageID;
      isShowSimpleMessageList.value = true;
    }
    function setAudioPlayed(messageID) {
      audioPlayedMapping.value[messageID] = true;
    }
    __expose({
      oneByOneForwardMessage,
      mergeForwardMessage,
      scrollToLatestMessage
    });
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.unref(isOfficial)
      }, common_vendor.unref(isOfficial) ? {
        b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能，不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款的信息，勿轻易拨打陌生电话，谨防上当受骗。")),
        c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.点此投诉")),
        d: common_vendor.o$1(($event) => openComplaintLink(common_vendor.unref(TUIKit_components_TUIChat_messageList_link_index.Link).complaint))
      } : {}, {
        e: _ctx.isGroup
      }, _ctx.isGroup ? {
        f: props.groupID,
        g: common_vendor.p({
          groupID: props.groupID
        })
      } : {}, {
        h: !common_vendor.unref(isCompleted)
      }, !common_vendor.unref(isCompleted) ? {
        i: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.查看更多")),
        j: common_vendor.o$1(getHistoryMessageList)
      } : {}, {
        k: common_vendor.f(common_vendor.unref(messageList), (item, index, i0) => {
          return common_vendor.e({
            a: "c85b5b22-1-" + i0,
            b: common_vendor.p({
              currTime: item.time,
              prevTime: index > 0 ? common_vendor.unref(messageList)[index - 1].time : 0
            }),
            c: item.type === common_vendor.unref(TYPES).MSG_GRP_TIP || common_vendor.unref(TUIKit_components_TUIChat_utils_utils.isCreateGroupCustomMessage)(item)
          }, item.type === common_vendor.unref(TYPES).MSG_GRP_TIP || common_vendor.unref(TUIKit_components_TUIChat_utils_utils.isCreateGroupCustomMessage)(item) ? {
            d: "c85b5b22-2-" + i0,
            e: common_vendor.p({
              content: item.getMessageContent()
            })
          } : !item.isRevoked && !common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item) ? common_vendor.e({
            g: item.type === common_vendor.unref(TYPES).MSG_TEXT
          }, item.type === common_vendor.unref(TYPES).MSG_TEXT ? {
            h: "c85b5b22-4-" + i0 + "," + ("c85b5b22-3-" + i0),
            i: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: item
            })
          } : item.type === common_vendor.unref(TYPES).MSG_IMAGE ? {
            k: common_vendor.o$1(($event) => handleImagePreview(index), item.vueForRenderKey),
            l: "c85b5b22-6-" + i0 + "," + ("c85b5b22-5-" + i0),
            m: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: item
            }),
            n: "c85b5b22-5-" + i0 + "," + ("c85b5b22-3-" + i0),
            o: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item)
            })
          } : item.type === common_vendor.unref(TYPES).MSG_VIDEO ? {
            q: "c85b5b22-8-" + i0 + "," + ("c85b5b22-7-" + i0),
            r: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: item
            }),
            s: "c85b5b22-7-" + i0 + "," + ("c85b5b22-3-" + i0),
            t: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item)
            })
          } : item.type === common_vendor.unref(TYPES).MSG_AUDIO ? {
            w: common_vendor.o$1(setAudioPlayed, item.vueForRenderKey),
            x: common_vendor.o$1(getGlobalAudioContext, item.vueForRenderKey),
            y: "c85b5b22-9-" + i0 + "," + ("c85b5b22-3-" + i0),
            z: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: item,
              broadcastNewAudioSrc: common_vendor.unref(broadcastNewAudioSrc)
            })
          } : item.type === common_vendor.unref(TYPES).MSG_MERGER ? {
            B: common_vendor.o$1(assignMessageIDInUniapp, item.vueForRenderKey),
            C: "c85b5b22-10-" + i0 + "," + ("c85b5b22-3-" + i0),
            D: common_vendor.p({
              renderData: item.payload,
              messageItem: item
            })
          } : item.type === common_vendor.unref(TYPES).MSG_FILE ? {
            F: "c85b5b22-11-" + i0 + "," + ("c85b5b22-3-" + i0),
            G: common_vendor.p({
              content: item.getMessageContent()
            })
          } : item.type === common_vendor.unref(TYPES).MSG_FACE ? {
            I: "c85b5b22-12-" + i0 + "," + ("c85b5b22-3-" + i0),
            J: common_vendor.p({
              content: item.getMessageContent()
            })
          } : item.type === common_vendor.unref(TYPES).MSG_LOCATION ? {
            L: "c85b5b22-13-" + i0 + "," + ("c85b5b22-3-" + i0),
            M: common_vendor.p({
              content: item.getMessageContent()
            })
          } : item.type === common_vendor.unref(TYPES).MSG_CUSTOM ? {
            O: "c85b5b22-14-" + i0 + "," + ("c85b5b22-3-" + i0),
            P: common_vendor.p({
              content: item.getMessageContent(),
              messageItem: item
            })
          } : {}, {
            j: item.type === common_vendor.unref(TYPES).MSG_IMAGE,
            p: item.type === common_vendor.unref(TYPES).MSG_VIDEO,
            v: item.type === common_vendor.unref(TYPES).MSG_AUDIO,
            A: item.type === common_vendor.unref(TYPES).MSG_MERGER,
            E: item.type === common_vendor.unref(TYPES).MSG_FILE,
            H: item.type === common_vendor.unref(TYPES).MSG_FACE,
            K: item.type === common_vendor.unref(TYPES).MSG_LOCATION,
            N: item.type === common_vendor.unref(TYPES).MSG_CUSTOM,
            Q: common_vendor.o$1(($event) => resendMessage(item), item.vueForRenderKey),
            R: common_vendor.o$1(blinkMessage, item.vueForRenderKey),
            S: common_vendor.o$1(scrollTo, item.vueForRenderKey),
            T: common_vendor.o$1(changeSelectMessageIDList, item.vueForRenderKey),
            U: common_vendor.o$1(setReadReceiptPanelVisible, item.vueForRenderKey),
            V: "c85b5b22-3-" + i0,
            W: common_vendor.p({
              messageItem: common_vendor.unref(TUIKit_components_TUIChat_utils_utils.deepCopy)(item),
              content: item.getMessageContent(),
              isAudioPlayed: common_vendor.unref(audioPlayedMapping)[item.ID],
              blinkMessageIDList: common_vendor.unref(blinkMessageIDList),
              isMultipleSelectMode: _ctx.isMultipleSelectMode,
              multipleSelectedMessageIDList: common_vendor.unref(multipleSelectedMessageIDList)
            }),
            X: `msg-bubble-${item.ID}`,
            Y: common_vendor.o$1(($event) => handleToggleMessageItem($event, item, index, true), item.vueForRenderKey),
            Z: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchstart"), item.vueForRenderKey),
            aa: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchend"), item.vueForRenderKey),
            ab: common_vendor.o$1(($event) => handleH5LongPress($event, item, index, "touchend"), item.vueForRenderKey)
          }) : !item.isRevoked && common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item) ? {
            ad: common_vendor.o$1(resendMessage, item.vueForRenderKey),
            ae: common_vendor.o$1(handleToggleMessageItem, item.vueForRenderKey),
            af: common_vendor.o$1(handleH5LongPress, item.vueForRenderKey),
            ag: "c85b5b22-15-" + i0,
            ah: common_vendor.p({
              message: item
            })
          } : {
            ai: common_vendor.o$1(($event) => handleEdit(item), item.vueForRenderKey),
            aj: "c85b5b22-16-" + i0,
            ak: common_vendor.p({
              isEdit: item.type === common_vendor.unref(TYPES).MSG_TEXT,
              messageItem: item
            })
          }, {
            f: !item.isRevoked && !common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item),
            ac: !item.isRevoked && common_vendor.unref(TUIKit_plugins_pluginComponents_index.isPluginMessage)(item),
            al: item.ID === common_vendor.unref(toggleID)
          }, item.ID === common_vendor.unref(toggleID) ? {
            am: item.flow === "out" ? 1 : "",
            an: item.flow === "in" ? 1 : "",
            ao: common_vendor.o$1(() => emits("toggleMultipleSelectMode"), item.vueForRenderKey),
            ap: "c85b5b22-17-" + i0,
            aq: common_vendor.p({
              messageItem: item,
              isMultipleSelectMode: _ctx.isMultipleSelectMode
            })
          } : {}, {
            ar: common_vendor.o$1(($event) => toggleID.value = "", item.vueForRenderKey),
            as: `tui-${item.ID}`,
            at: item.vueForRenderKey,
            av: common_vendor.n("message-li " + item.flow)
          });
        }),
        l: common_vendor.unref(scrollTop),
        m: `tui-${common_vendor.unref(historyFirstMessageID)}`,
        n: common_vendor.o$1(
          //@ts-ignore
          (...args) => common_vendor.unref(handelScrollListScroll) && common_vendor.unref(handelScrollListScroll)(...args)
        ),
        o: common_vendor.sr(scrollButtonInstanceRef, "c85b5b22-18", {
          "k": "scrollButtonInstanceRef"
        }),
        p: common_vendor.o$1(scrollToLatestMessage),
        q: common_vendor.unref(reSendDialogShow)
      }, common_vendor.unref(reSendDialogShow) ? {
        r: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.确认重发该消息？")),
        s: common_vendor.o$1(($event) => resendMessageConfirm()),
        t: common_vendor.o$1((e) => reSendDialogShow.value = e),
        v: common_vendor.p({
          show: common_vendor.unref(reSendDialogShow),
          isH5: !common_vendor.unref(TUIKit_utils_env.isPC),
          center: true,
          isHeaderShow: common_vendor.unref(TUIKit_utils_env.isPC)
        })
      } : {}, {
        w: common_vendor.unref(isShowReadUserStatusPanel)
      }, common_vendor.unref(isShowReadUserStatusPanel) ? {
        x: common_vendor.o$1(setReadReceiptPanelVisible),
        y: common_vendor.p({
          message: Object.assign({}, common_vendor.unref(readStatusMessage))
        })
      } : {}, {
        z: common_vendor.o$1(($event) => isShowSimpleMessageList.value = false),
        A: common_vendor.p({
          isMounted: common_vendor.unref(isShowSimpleMessageList),
          messageID: common_vendor.unref(simpleMessageListRenderMessageID)
        }),
        B: common_vendor.p({
          visible: common_vendor.unref(isShowSimpleMessageList),
          overlayColor: "transparent",
          popDirection: "right"
        }),
        C: common_vendor.unref(TUIKit_utils_env.isMobile) ? 1 : "",
        D: common_vendor.o$1(onMessageListBackgroundClick)
      });
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c85b5b22"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/index.js.map
