import{Q as p,_ as g}from"./sorry.39781903.js";import{A as s,B as m,C as h,I as o,H as _,ac as f,a9 as i,L as a,M as n,G as u,E as y,af as k}from"./index.816d8fc2.js";const w={key:0,class:"absolute-full",style:{background:"rgba(255,255,255,.7)","z-index":"1"}},b={key:0,class:"row justify-center q-my-md"},x={key:0,src:"statics/networkErrorimg.png",width:"100"},B={key:1,src:g,width:"60"},v={class:"text-caption text-grey q-mt-sm text-center ellipsis-3.-lines"},C=i("br",null,null,-1),N={__name:"LoadingView",props:{loading:[Boolean,String,Object],refresh:{type:Function},canRefresh:Boolean},setup(l){const e=l;return(c,t)=>(s(),m(k(e.canRefresh?"q-pull-to-refresh":"div"),{class:"vlist-wrapper",disable:!e.refresh,onRefresh:e.refresh,color:"red","bg-color":"white"},{default:h(()=>{var r;return[e.loading?(s(),o("div",w,[e.loading===!0||e.loading==="true"?(s(),o("div",b,[_(p,{color:"grey",size:"24px"})])):e.loading?(s(),o("div",{key:1,class:"q-py-lg column items-center",onClick:t[0]||(t[0]=f((...d)=>e.refresh&&e.refresh(...d),["stop"]))},[((r=e.loading)==null?void 0:r.code)==-1?(s(),o("img",x)):(s(),o("img",B)),i("span",v,[a(n(e.loading.message||e.loading),1),C,a(" "+n(e.loading.code==-1?"\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D":""),1)])])):u("",!0)])):y(c.$slots,"default",{key:1})]}),_:3},40,["disable","onRefresh"]))}};export{N as _};