"use strict";
const common_vendor = require("../../../common/vendor.js");
require("../../adapter-vue.js");
const TUIKit_utils_env = require("../../utils/env.js");
if (!Math) {
  MessageBubble();
}
const MessageBubble = () => "../../components/TUIChat/message-list/message-elements/message-bubble.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "message-plugin-layout",
  props: {
    message: { default: () => ({}) },
    showStyle: { default: "" },
    bubbleClassNameList: { default: () => [] },
    blinkMessageIDList: { default: () => [] }
  },
  emits: ["resendMessage", "handleToggleMessageItem", "handleH5LongPress"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const messageModel = common_vendor.computed(() => {
      var _a;
      return common_vendor.Jt.getMessageModel((_a = props.message) == null ? void 0 : _a.ID);
    });
    const resendMessage = (message) => {
      emits("resendMessage", message);
    };
    const handleToggleMessageItem = (e, message, isLongpress = false) => {
      emits("handleToggleMessageItem", e, message, isLongpress);
    };
    const handleH5LongPress = (e, message, type) => {
      emits("handleH5LongPress", e, message, type);
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: props.showStyle === "tip"
      }, props.showStyle === "tip" ? {} : props.showStyle === "bubble" ? common_vendor.e({
        c: !common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
      }, !common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {} : {}, {
        d: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
      }, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {} : {}, {
        e: common_vendor.o$1(($event) => resendMessage(common_vendor.unref(messageModel))),
        f: common_vendor.p({
          messageItem: common_vendor.unref(messageModel),
          content: common_vendor.unref(messageModel).getMessageContent(),
          blinkMessageIDList: props.blinkMessageIDList,
          classNameList: props.bubbleClassNameList
        }),
        g: common_vendor.o$1(($event) => handleToggleMessageItem($event, common_vendor.unref(messageModel), true)),
        h: common_vendor.o$1(($event) => handleToggleMessageItem($event, common_vendor.unref(messageModel))),
        i: common_vendor.o$1(($event) => handleH5LongPress($event, common_vendor.unref(messageModel), "touchstart")),
        j: common_vendor.o$1(($event) => handleH5LongPress($event, common_vendor.unref(messageModel), "touchend")),
        k: common_vendor.o$1(($event) => handleH5LongPress($event, common_vendor.unref(messageModel), "touchend"))
      }) : {}, {
        b: props.showStyle === "bubble"
      });
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-60deb703"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/plugins/plugin-components/message-plugin-layout.js.map
