import{k as C,ah as N,o as T,ac as B,_ as j}from"./index-ae60edf9.js";import{T as D,a as L}from"./index-80468eb1.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{u as O}from"./vue-i18n-90d534a9.js";import{d as k,k as u,o as r,c as m,$ as p,a as i,aX as _,u as f,an as R,b as S,j as E,bj as g,F as y,aI as b,O as $,P as U}from"./@vue-cb50a1c4.js";import"./vue-router-7f882520.js";import"./open-im-sdk-wasm-f19f04ec.js";import"./dayjs-4460abc8.js";import"./@amap-aca98dec.js";import"./pinia-de4079f2.js";import"./axios-7d5a0a64.js";import"./form-data-497f8b5e.js";import"./uuid-a960c1f4.js";import"./date-fns-f56f60e6.js";import"./@babel-7fd5df1e.js";import"./mitt-f7ef348c.js";import"./@vueuse-19adab01.js";import"./livekit-client-ca552de3.js";import"./@livekit-3058dbe8.js";import"./loglevel-e40a507a.js";import"./rxjs-2154ddb2.js";import"./tslib-8dbab242.js";import"./@vuemap-5ebdc63e.js";import"./lodash-es-91418b19.js";import"./@intlify-1c0af683.js";import"./use-id-22cfdfcf.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";const V={class:"ml-3 flex h-full w-full items-center justify-between"},z={class:"flex flex-1 items-center justify-between"},F={class:"max-w-[60%] truncate"},H={class:"text-base"},J={class:"text-sm"},A={class:"w-[50px] text-right text-sm"},w=k({__name:"RtcHistoryItem",props:{source:null},setup(c){const n=c,{t:s}=O(),v=C(),l=u(()=>JSON.parse(n.source.customElem.data).data),e=u(()=>l.value.status===B.Successed),o=u(()=>n.source.sendID===v.selfInfo.userID),x=u(()=>l.value.mediaType==="audio"?s("rtc.voice"):s("rtc.video")),d=u(()=>e.value?l.value.duration:o.value?s("rtc.callOut"):s("rtc.beCall"));return(I,a)=>{const t=T;return r(),m("div",{class:R(["flex h-[64px] items-center bg-white px-[22px]",{"text-error-text":!f(e)}])},[p(t,{src:c.source.userInfo.faceUrl,size:42,"is-group":!1,desc:c.source.userInfo.name},null,8,["src","desc"]),i("div",V,[i("div",z,[i("div",F,[i("div",H,_(c.source.userInfo.name),1),i("div",J,"["+_(f(x))+"]"+_(f(N)(c.source.time)),1)])]),i("div",A,_(f(d)),1)])],2)}}}),P={class:"page_container"},X=k({__name:"index",setup(c){const n=S(0),s=S(),v=C(),l=()=>{let e=[];try{const o=localStorage.getItem(`${v.selfInfo.userID}_rtc_historyList`);o&&(e=JSON.parse(o))}catch{}s.value=e};return E(()=>{l()}),(e,o)=>{const x=M,d=D,I=L;return r(),m("div",P,[p(x,{title:e.$t("rtc.callRecord")},null,8,["title"]),p(I,{active:n.value,"onUpdate:active":o[0]||(o[0]=a=>n.value=a)},{default:g(()=>[p(d,{title:e.$t("rtc.allCall")},{default:g(()=>{var a;return[(r(!0),m(y,null,b((a=s.value)==null?void 0:a.sort((t,h)=>h.time-t.time),t=>(r(),$(w,{source:t},null,8,["source"]))),256))]}),_:1},8,["title"]),p(d,{title:e.$t("rtc.missedCall")},{default:g(()=>{var a;return[(r(!0),m(y,null,b((a=s.value)==null?void 0:a.sort((t,h)=>h.time-t.time),t=>(r(),m(y,null,[t.status!==3?(r(),$(w,{key:0,source:t},null,8,["source"])):U("",!0)],64))),256))]}),_:1},8,["title"])]),_:1},8,["active"])])}}});const It=j(X,[["__scopeId","data-v-69faaead"]]);export{It as default};
