import{u as G}from"./vue-i18n-90d534a9.js";import{u as N}from"./vue-router-7f882520.js";import{o as B}from"./index-ae60edf9.js";import{A as t}from"./data-6aa94e54.js";import{d as E,k as a,o as c,c as i,$ as F,u as n,a as o,aX as s,P as R,O as b,bj as v,_ as C}from"./@vue-cb50a1c4.js";import{B as w}from"./index-e4a7d928.js";const _="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAb1JREFUWEft2E1LAkEYB/D/41sGFgQePBVEBB0K6h4EWdElo09ghN6C9ouk0M2KPAZB2Cl6EfoCVuCtS1GXDoF0ydLVJ0YjJF93Z93dYPc8z8yP/7wwswSAYONP4P4HkJltlSNRPbffBB2gxvlxEtQYWFNzJ0FLEkzsn12CMSE7OBNCBOSUWGS+XV+apziROPEj4HsGEJQF1uqZP5T4esAwoOhIIL1D/pAeoOpSQ6zSMYhGf+qflFhk3FCgHpioSaZOQ0yuLEBTDH4g0CQAewD3js6DqlrKApgG+Ja4GmNy52wBFLhyuZQlquPgGlwid3GYy/RoObAVTtlaKSTTmTHLge1wtfVoNbATznJgN5ylwF5wlgEbccy4I7c/LDZEq3PT9DX4B5f3en2L25urb+0OdVOBicOLEa58XhNhlhldcaZOscChWrwCaK5XnGlAvThTgDK4vgNlcX0FGoHrG9AonACm0zcDhfL7C4B7JRZZNuTCWnuLAGEAeY+n8znXy6VWIKPRha9ObTW9SXZTmQMCzRAqazvxjddeELJtNAFlB9NT7wD1pNZY4yToJCibgGx90xqU7bBf9bb/y/8NH/GqYE+PFTEAAAAASUVORK5CYII=",T={class:"flex items-start border-b border-b-gap-text px-[22px] py-3"},k={class:"relative ml-4 flex h-full w-full items-center justify-between"},L={key:0,class:"flex flex-col text-xs text-[#666]"},O={class:"my-1"},D={class:"ml-1 text-primary"},z={key:1,class:"text-[13px] text-[#999]"},P={class:"flex items-center"},V=["src"],J={key:1,class:"text-xs text-[#898989]"},Q=E({__name:"index",props:{source:null,type:null,iconSize:{default:42},index:null,total:null},setup(r){const e=r,{t:l}=G(),u=N(),A=e.type===t.SentFriendApplication||e.type===t.SentGroupApplication,d=e.type===t.SentGroupApplication||e.type===t.RecivedGroupApplication,m=e.type===t.SentGroupApplication,y=a(()=>{switch(e.type){case t.RecivedFriendApplication:return e.source.fromNickname;case t.SentFriendApplication:return e.source.toNickname;case t.RecivedGroupApplication:return e.source.nickname;case t.SentGroupApplication:return e.source.groupName;default:return""}}),h=a(()=>{switch(e.type){case t.RecivedFriendApplication:return e.source.fromFaceURL;case t.SentFriendApplication:return e.source.toFaceURL;case t.RecivedGroupApplication:return e.source.userFaceURL;case t.SentGroupApplication:return e.source.groupFaceURL;default:return""}}),f=a(()=>e.source.handleResult===0&&e.type===t.RecivedFriendApplication),g=a(()=>e.source.handleResult===1?l("buttons.approved"):e.source.handleResult===-1?l("buttons.rejected"):l("buttons.pending")),S=()=>{u.push({path:"applicationDetails",query:{application:JSON.stringify(e.source),type:e.type}})};return(p,Y)=>{const x=w;return c(),i("div",T,[F(B,{src:n(h),size:r.iconSize,"is-group":m},null,8,["src","size"]),o("div",k,[o("div",null,[o("div",null,s(n(y)),1),n(d)?(c(),i("div",L,[o("div",O,[o("span",null,s(p.$t("applyJoin")),1),o("span",D,s(r.source.groupName),1)]),o("div",null,s(p.$t("groupApplyDesc"))+s(r.source.reqMsg||""),1)])):(c(),i("div",z,s(r.source.reqMsg||" "),1))]),o("div",P,[n(A)?(c(),i("img",{key:0,class:"h-5 w-5",src:n(_),alt:""},null,8,V)):R("",!0),n(f)?(c(),b(x,{key:2,size:"small",hairline:"",type:"primary",onClick:S},{default:v(()=>[C(s(p.$t("buttons.toDetail")),1)]),_:1})):(c(),i("span",J,s(n(g)),1))])])])}}});export{Q as _};
