"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const TUIKit_components_TUIChat_config = require("../../config.js");
const common_assets = require("../../../../../common/assets.js");
require("../../offlinePushInfoManager/index.js");
const stores_counter = require("../../../../../stores/counter.js");
const components_request = require("../../../../../components/request.js");
if (!Math) {
  ToolbarItemContainer();
}
const ToolbarItemContainer = () => "../toolbar-item-container/index.js";
const _sfc_main = {
  __name: "CustomMessage",
  emits: ["onDialogPopupShowOrHide"],
  setup(__props, { emit: __emit }) {
    const counter = stores_counter.useCounterStore();
    const evaluateIcon = TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark" ? common_assets.InvitationDark : common_assets.InvitationLight;
    const emits = __emit;
    const onDialogShow = () => {
      emits("onDialogPopupShowOrHide", true);
    };
    const onDialogClose = () => {
      emits("onDialogPopupShowOrHide", false);
    };
    const currentConversation = common_vendor.ref();
    const mylist = common_vendor.ref([]);
    const youlist = common_vendor.ref([]);
    common_vendor.Jt.watch(common_vendor.o.CONV, {
      currentConversation: (conversation) => {
        currentConversation.value = conversation;
        components_request.request({
          url: "pk/queryMyCanUsePkData",
          method: "POST",
          data: {
            userId: counter.myitem.id
          },
          userInfo: true
        }).then((res) => {
          if (res.code === 200) {
            mylist.value = res.data;
          }
        });
        components_request.request({
          url: "pk/listUninvitedPublishedAnchorsByUserId",
          method: "POST",
          data: {
            userId: currentConversation.value.userProfile.userID
          },
          userInfo: true
        }).then((res) => {
          if (res.code === 200) {
            youlist.value = res.data;
          }
        });
      }
    });
    const container = common_vendor.ref();
    const list = common_vendor.ref([]);
    const popup = common_vendor.ref();
    function onyourChoose() {
      popup.value.open("center");
      list.value = youlist.value;
    }
    function onmyChoose() {
      popup.value.open("center");
      list.value = mylist.value;
    }
    common_vendor.ref(null);
    const submitEvaluate = () => {
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o$1(onyourChoose),
        b: common_vendor.o$1(onmyChoose),
        c: common_vendor.o$1(submitEvaluate),
        d: common_vendor.sr(container, "241228dc-0", {
          "k": "container"
        }),
        e: common_vendor.o$1(onDialogShow),
        f: common_vendor.o$1(onDialogClose),
        g: common_vendor.p({
          iconFile: common_vendor.unref(evaluateIcon),
          title: "邀请",
          needBottomPopup: true,
          iconWidth: _ctx.isUniFrameWork ? "36px" : "30px",
          iconHeight: _ctx.isUniFrameWork ? "36px" : "30px"
        })
      };
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-241228dc"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/evaluate/CustomMessage.js.map
