import{q as $,h as N,X as k,a as f,r as L,f as D,v as o,x as t,y as g,A as s,E as l,aO as S,z as i,B as r,M as F,N as p,C as j,L as B}from"./en-Dg6bq8Ph.js";import{e as b,f as E,l as V,r as z,C as M}from"./main-Cxz4dE8X.js";const q=["onClick"],A=["onClick"],T=$({__name:"message-forward-dialog",emits:["select","confirm"],setup(Q,{emit:h}){const{$tr:d}=N(k),c=h,{contactList:_}=b(),{namedChatList:C}=f(E()),{currentChatId:v}=f(V()),m=L(""),u=D(()=>_.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&!z.includes(e.id))),y=D(()=>C.value.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&e.chatId!==v.value));function w({type:e,data:n}){c("select",{type:e,data:n}),c("confirm")}return(e,n)=>(o(),t("div",{class:s(e.$style.messageForwardDialog)},[g(l(S),{modelValue:m.value,"onUpdate:modelValue":n[0]||(n[0]=a=>m.value=a),icon:"round-search",clearable:"",class:s(e.$style.search)},null,8,["modelValue","class"]),i("div",{class:s(e.$style.messageForwardDialogBody)},[i("h4",{class:s(e.$style.messageForwardDialogSubtitle)},r(l(d)("chat.message.forward.dialog.chats.section.title")),3),y.value.length?(o(!0),t(F,{key:0},p(y.value,a=>(o(),t("div",{key:a.chatId,class:s(e.$style.messageForwardDialogItem),onClick:I=>w({type:"chat",data:a.chatId})},[g(j,{name:a.displayName,shape:a.members.length>2?"decagon":"circle",size:28},null,8,["name","shape"]),i("div",{class:s(e.$style.messageForwardDialogItemName)},r(a.displayName),3)],10,q))),128)):(o(),t("div",{key:1,class:s(e.$style.messageForwardDialogEmpty)},r(l(d)("chat.message.forward.dialog.chats.empty")),3)),i("h4",{class:s(e.$style.messageForwardDialogSubtitle)},r(l(d)("chat.message.forward.dialog.contacts.section.title")),3),u.value.length?(o(!0),t(F,{key:2},p(u.value,a=>(o(),t("div",{key:a.id,class:s(e.$style.messageForwardDialogItem),onClick:I=>w({type:"contact",data:a.mail})},[g(M,{name:a.displayName,size:28,readonly:!0},null,8,["name"]),i("div",{class:s(e.$style.messageForwardDialogItemName)},r(a.displayName),3)],10,A))),128)):(o(),t("div",{key:3,class:s(e.$style.messageForwardDialogEmpty)},r(l(d)("chat.message.forward.dialog.contacts.empty")),3))],2)],2))}}),X="_messageForwardDialog_18j0f_1",O="_search_18j0f_9",R="_messageForwardDialogBody_18j0f_13",U="_messageForwardDialogSubtitle_18j0f_20",G="_messageForwardDialogItem_18j0f_27",H="_messageForwardDialogItemName_18j0f_40",J="_messageForwardDialogEmpty_18j0f_53",K={messageForwardDialog:X,search:O,messageForwardDialogBody:R,messageForwardDialogSubtitle:U,messageForwardDialogItem:G,messageForwardDialogItemName:H,messageForwardDialogEmpty:J},P={$style:K},Z=B(T,[["__cssModules",P]]);export{Z as default};
