import{V as p}from"./virtual-list-b1ee24f1.js";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{l as d,I as u,a1 as f}from"./index-ae60edf9.js";import{M as h}from"./open-im-sdk-wasm-f19f04ec.js";import{_}from"./GlobalSearchResult.vue_vue_type_script_setup_true_lang-a462f4e5.js";import{d as g,b as v,l as I,ar as M,o as m,c as y,$ as x,a as L,O as k,u as w,P as D}from"./@vue-cb50a1c4.js";import"./vue-router-7f882520.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";import"./dayjs-4460abc8.js";import"./@amap-aca98dec.js";import"./vue-i18n-90d534a9.js";import"./@intlify-1c0af683.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";const N={class:"page_container"},T={class:"flex-1 overflow-y-auto border-t"},ae=g({__name:"index",setup(B){const c=d(),o=v([]),e=I({loading:!1,hasMore:!0,pageIndex:1,count:50}),r=()=>{const t={conversationID:c.storeCurrentConversation.conversationID,keywordList:[],keywordListMatchType:0,senderUserIDList:[],messageTypeList:[h.FileMessage],searchTimePosition:0,searchTimePeriod:0,pageIndex:e.pageIndex,count:e.count};u.searchLocalMessages(t).then(({data:s})=>{if(e.hasMore){const a=s.searchResultItems?s.searchResultItems.map(i=>i.messageList.map(n=>({...n,showName:i.showName,faceURL:f(n.fileElem.fileName)}))).flat():[];console.error(a),o.value=a,e.pageIndex+=1,e.hasMore=a.length===50}})};return M(()=>{r()}),(t,s)=>(m(),y("div",N,[x(l,{class:"shadow-md",title:t.$t("document")},null,8,["title"]),L("div",T,[o.value.length>0?(m(),k(w(p),{key:0,class:"my_scrollbar h-full overflow-hidden rounded-md","data-key":"clientMsgID","data-sources":o.value,"data-component":_,"estimate-size":88,onTobottom:r,"extra-props":{isFile:!0}},null,8,["data-sources"])):D("",!0)])]))}});export{ae as default};
