import{_ as e,z as o,d as a,e as t,o as s,f as r,w as u,h as p,j as h,t as d,i}from"./index-DD8OSUAV.js";import{_ as n}from"./head-image.Bos9WwBh.js";const g=e({name:"group-item",data:()=>({}),methods:{showGroupInfo(){"synergy"===this.source?this.loadGroupInfo():o({url:"/pages/group/group-info?id="+this.group.id})},loadGroupInfo(){this.$http({url:`/group/find/${this.group.id}`,method:"GET"}).then((e=>{this.chatStore.updateChatFromGroup(e),this.groupStore.updateGroup(e),this.onSendMessage(e)}))},onSendMessage(e){let a={type:"GROUP",targetId:e.id,showName:e.showGroupName,headImage:e.headImage,caseNum:e.caseNum,groupType:e.groupType};this.chatStore.openChat(a);let t=this.chatStore.findChatIdx(a);o({url:"/pages/chat/chat-box?chatIdx="+t})}},props:{group:{type:Object},source:{type:String,default:""}}},[["render",function(e,o,g,m,l,c){const f=a(t("head-image"),n),G=i;return s(),r(G,{class:"group-item",onClick:o[0]||(o[0]=e=>c.showGroupInfo())},{default:u((()=>[p(f,{name:g.group.showGroupName,url:g.group.headImage,size:90},null,8,["name","url"]),p(G,{class:"group-name"},{default:u((()=>[p(G,null,{default:u((()=>[h(d(g.group.showGroupName),1)])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-8037fb91"]]);export{g as _};
