import{S as o,u as g,t as h,i as l,c as t,I as m,a as p,N as d,b as a,d as f,C as w,m as c,E as H,e as v,f as C,g as b,h as y}from"./index-D9R0tRpC.js";const I="_container_1hobu_1",N={container:I};var S=h("<div>");const R=()=>{const e=o.home$,u=g();(Math.abs(o.lastHomeTime$()?.diffNow().toMillis())??0)>120*1e3&&o.reloadHome(),console.log("Home page with resource: ",e()),console.log("Home page with resource state: ",e.state);let r;return(()=>{var n=S();return l(n,t(d,{isRoot:!0,get childrenAfter(){return t(m,{icon:p,variant:"none",shape:"circle",width:"30px",height:"30px",iconInset:"0px",style:{"margin-left":"24px"},onClick:()=>{o.reloadHome()},focusableOpts:{groupId:"nav-bar",groupIndices:[1],groupType:"horizontal",onPress:()=>o.reloadHome()}})}}),null),l(n,t(a,{get when(){return e.state=="ready"},get children(){return[t(a,{get when(){return c(()=>!!e())()&&e().data.length>0},get children(){return t(f,{ref(s){var i=r;typeof i=="function"?i(s):r=s},get children(){return t(w,{get pager(){return e()},outerContainerRef:r,openChannelButton:!0})}})}}),t(a,{get when(){return c(()=>!!e())()&&e().data.length==0},get children(){return t(H,{icon:C,title:"No home results",description:"Install, configure, or enable more sources",actions:[{icon:v,title:"Go to Sources",action:()=>u("/web/sources")}]})}})]}}),null),b(()=>y(n,N.container)),n})()};export{R as default};
