import{r as U,w as y,U as f,dU as p,az as a,V as s,b2 as n,Y as u,cn as l,b4 as I,d9 as b,a3 as g,bX as d,dW as _,y as m,h as k,X as v,bS as R,c_ as x,a2 as A,F as C,bW as V}from"./index.69621fe4.js";const w=U({modalSendFile:!1,modalNewChat:!1,modalAddAgentes:!1,selectedAgenteId:null,selectedAgentesGroup:[],showChatInfo:!1,showEmojiPicker:!1,responderMsg:null});function Q(){return{...y(w)}}const $=["src"],j=["src"],B={__name:"chatAvatar",props:{chat:Object},setup(e){const t=e,o=f(()=>t.chat);return t.chat.agentes.profileImage&&!t.chat.agentes.imgUrl&&p.get(`/agentes/profileImage/${encodeURIComponent(t.chat.agentes.profileImage)}`,{responseType:"blob"}).then(c=>{const r=URL.createObjectURL(c.data);o.value.agentes.imgUrl=r}),(c,r)=>e.chat.agentes.imgUrl&&e.chat.agentes.conectado?(a(),s(l,{key:0,color:"green"},{default:n(()=>[u("img",{style:{padding:"2px"},src:e.chat.agentes.imgUrl},null,8,$)]),_:1})):e.chat.agentes.imgUrl?(a(),s(l,{key:1},{default:n(()=>[u("img",{src:e.chat.agentes.imgUrl},null,8,j)]),_:1})):(a(),s(l,{key:2,color:"secondary",icon:"person"}))}},N={__name:"grupoAvatar",props:{size:{type:String,default:"md"}},setup(e){return(t,o)=>(a(),s(l,{size:e.size,color:"secondary",icon:"groups"},null,8,["size"]))}},z=["src"],L=["src"],O={__name:"agenteGroupItem",props:{agente:Object},setup(e){const t=e,o=f(()=>t.agente),{selectedAgentesGroup:c}=Q();return t.agente.profileImage&&p.get(`/agentes/profileImage/${encodeURIComponent(t.agente.profileImage)}`,{responseType:"blob"}).then(r=>{const i=URL.createObjectURL(r.data);o.value.imgUrl=i}),(r,i)=>I((a(),s(V,{tag:"label"},{default:n(()=>[g(d,{side:"",top:""},{default:n(()=>[g(_,{modelValue:m(c),"onUpdate:modelValue":i[0]||(i[0]=h=>k(c)?c.value=h:null),val:e.agente.id},null,8,["modelValue","val"])]),_:1}),g(d,{avatar:""},{default:n(()=>[e.agente.conectado?(a(),s(l,{key:0,color:"green"},{default:n(()=>[e.agente.profileImage?(a(),v("img",{key:0,style:{padding:"2px"},src:m(o).imgUrl},null,8,z)):(a(),s(R,{key:1,name:"person"}))]),_:1})):e.agente.profileImage?(a(),s(l,{key:1},{default:n(()=>[u("img",{src:m(o).imgUrl},null,8,L)]),_:1})):(a(),s(l,{key:2,color:"secondary",icon:"person"}))]),_:1}),g(d,null,{default:n(()=>[g(x,null,{default:n(()=>[A(C(e.agente.fullname),1)]),_:1})]),_:1})]),_:1})),[[b]])}};export{B as _,N as a,O as b,Q as u};
