"use strict";
const common_vendor = require("../../../../../../common/vendor.js");
require("../../../../../adapter-vue.js");
const TUIKit_utils_env = require("../../../../../utils/env.js");
const TUIKit_components_TUIChat_emojiConfig_index = require("../../../emoji-config/index.js");
if (!Math) {
  (SimpleMessageList + Overlay + Drawer)();
}
const Overlay = () => "../../../../common/Overlay/index.js";
const Drawer = () => "../../../../common/Drawer/index.js";
const SimpleMessageList = () => "../simple-message-list/index.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  props: {
    renderData: {},
    disabled: { type: Boolean, default: false },
    messageItem: { default: () => ({}) }
  },
  emits: ["assignMessageIDInUniapp"],
  setup(__props, { emit: __emit }) {
    const emits = __emit;
    const props = __props;
    const isMessageListVisible = common_vendor.ref(false);
    function openMergeDetail() {
      if (props.disabled) {
        return;
      }
      if (!TUIKit_utils_env.isUniFrameWork) {
        isMessageListVisible.value = true;
      } else {
        emits("assignMessageIDInUniapp", props.messageItem.ID);
      }
    }
    function closeMergeDetail() {
      isMessageListVisible.value = false;
    }
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.t(props.renderData.title),
        b: common_vendor.f(props.renderData.abstractList.slice(0, 7), (item, index, i0) => {
          return {
            a: common_vendor.t(common_vendor.unref(TUIKit_components_TUIChat_emojiConfig_index.transformTextWithKeysToEmojiNames)(item)),
            b: index
          };
        }),
        c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUIChat.聊天记录")),
        d: common_vendor.o$1(openMergeDetail),
        e: !props.disabled && common_vendor.unref(TUIKit_utils_env.isPC)
      }, !props.disabled && common_vendor.unref(TUIKit_utils_env.isPC) ? {
        f: common_vendor.o$1(closeMergeDetail),
        g: common_vendor.p({
          isMounted: common_vendor.unref(isMessageListVisible),
          renderData: props.renderData,
          messageID: props.messageItem.ID
        }),
        h: common_vendor.o$1(($event) => isMessageListVisible.value = false),
        i: common_vendor.p({
          visible: common_vendor.unref(isMessageListVisible)
        })
      } : !props.disabled && common_vendor.unref(TUIKit_utils_env.isH5) && !common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
        k: common_vendor.o$1(closeMergeDetail),
        l: common_vendor.p({
          isMounted: common_vendor.unref(isMessageListVisible),
          renderData: props.renderData,
          messageID: props.messageItem.ID
        }),
        m: common_vendor.p({
          visible: common_vendor.unref(isMessageListVisible),
          isFullScreen: true,
          overlayColor: "transparent",
          popDirection: "right"
        })
      } : {}, {
        j: !props.disabled && common_vendor.unref(TUIKit_utils_env.isH5) && !common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
      });
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2d2bd7ef"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-list/message-elements/message-record/index.js.map
