"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const t=require("../../../utils/env.js"),n=e.defineComponent({__name:"index",props:{isFetching:{type:Boolean,default:!1},isTerminateObserve:{type:Boolean,default:!1}},emits:["onExposed"],setup(n,{emit:o}){var r;const s=o,i=n;let c=null;const a=e.ref(),u=(null==(r=e.getCurrentInstance())?void 0:r.proxy)||e.getCurrentInstance();return e.onMounted((()=>{i.isTerminateObserve||(t.isUniFrameWork?(c=e.index.createIntersectionObserver(u).relativeToViewport(),c.observe(".fetch-more-block",(()=>{s("onExposed")}))):(c=new IntersectionObserver((([e])=>{e.isIntersecting&&s("onExposed")}),{threshold:1}),a.value&&c.observe(a.value)))})),e.onUnmounted((()=>{c&&(c.disconnect(),c=null)})),e.watch((()=>i.isTerminateObserve),(e=>{c&&(e?c.disconnect():a.value&&(c.disconnect(),t.isUniFrameWork?c.observe(".fetch-more-block",(()=>{s("onExposed")})):c.observe(a.value)))})),(t,n)=>e.e({a:i.isFetching},i.isFetching?{b:e.t(e.unref(e.Wt).t("TUIChat.正在加载"))}:{c:e.t(e.unref(e.Wt).t("TUIChat.加载结束"))})}}),o=e._export_sfc(n,[["__scopeId","data-v-3bf21ef4"]]);wx.createComponent(o);
