import{c as I,i as $,A as N,r as k,f as h,g as o,h as t,E as g,n as s,p as l,y as i,z as r,M as p,N as D,_ as L}from"./address-utils-CRdnqoD9.js";import{n as S,o as b,X as B,w as E,J as V,C as z}from"./main-BWehD7To.js";const A=["onClick"],M=["onClick"],j=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(P,{emit:F}){const{$tr:d}=$(N),c=F,{contactList:_}=S(),{namedChatList:f,currentChatId:C}=b(),m=k(""),y=h(()=>_.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&!B.includes(e.id))),u=h(()=>f().filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&e.chatId!==C));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(E),{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),u.value.length?(o(!0),t(p,{key:0},D(u.value,a=>(o(),t("div",{key:a.chatId,class:s(e.$style.messageForwardDialogItem),onClick:v=>w({type:"chat",data:a.chatId})},[g(V,{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,A))),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),y.value.length?(o(!0),t(p,{key:2},D(y.value,a=>(o(),t("div",{key:a.id,class:s(e.$style.messageForwardDialogItem),onClick:v=>w({type:"contact",data:a.mail})},[g(z,{name:a.displayName,size:28,readonly:!0},null,8,["name"]),i("div",{class:s(e.$style.messageForwardDialogItemName)},r(a.displayName),3)],10,M))),128)):(o(),t("div",{key:3,class:s(e.$style.messageForwardDialogEmpty)},r(l(d)("chat.message.forward.dialog.contacts.empty")),3))],2)],2))}}),G="_messageForwardDialog_18trh_1",J="_search_18trh_8",K="_messageForwardDialogBody_18trh_12",T="_messageForwardDialogSubtitle_18trh_19",U="_messageForwardDialogItem_18trh_26",X="_messageForwardDialogItemName_18trh_39",q="_messageForwardDialogEmpty_18trh_52",H={messageForwardDialog:G,search:J,messageForwardDialogBody:K,messageForwardDialogSubtitle:T,messageForwardDialogItem:U,messageForwardDialogItemName:X,messageForwardDialogEmpty:q},O={$style:H},W=L(j,[["__cssModules",O]]);export{W as default};
