"use strict";const e=require("../../../../common/vendor.js"),t=require("../../../utils/env.js"),n=require("../../../../common/assets.js"),r=require("../../../constant.js");class s{static getInstance(){return s.instance||(s.instance=new s),s.instance}getMenu(){const n=this.generateMenuList();return!t.isPC&&n.length>0?[{text:e.Wt.t("TUIConversation.发起会话"),data:{name:"all",children:n}}]:n}generateMenuList(){return[{icon:n.C2C,text:e.Wt.t("TUIConversation.发起单聊"),data:{name:r.CONV_CREATE_TYPE.TYPEC2C},listener:{onClicked:this.createConversation.bind(this)}},{icon:n.createGroup,text:e.Wt.t("TUIConversation.发起群聊"),data:{name:r.CONV_CREATE_TYPE.TYPEGROUP},listener:{onClicked:this.createConversation.bind(this)}}]}createConversation(t){e.R.callService({serviceName:e.E.TUIConversation.SERVICE.NAME,method:e.E.TUIConversation.SERVICE.METHOD.CREATE_CONVERSATION,params:t})}}exports.ConversationHeaderServer=s;
