import{j as r}from"./query-ATBhtd3K.js";import{a as R,r as x}from"./vendor-EnoIVk-c.js";import{u as g}from"./routing-nZgBtxly.js";import{r as n,h as j,s as E,t as m,v as L}from"./en-IUV4ZXKH-BjYNERUx.js";import{r as S,L as P}from"./routing-BgsGBuSe.js";import{u as h}from"./StreamStatusContext-BuPATpTz.js";import{T as w}from"./ToolbarPanels-tcvPzqNN.js";import"./index-D4SjcYxX.js";import"./i18n-BYxb14hm.js";import"./useAuth-CqtZE9nt.js";import"./AuthContext-CYne_gJM.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function q(){const o=R(),f=g(),e=n(o==null?void 0:o.id),p=h(),d=j(),{data:s,isLoading:t,isError:a,error:u,refetch:c}=d.get.useQuery(e);if(x.useEffect(()=>{a&&!t&&console.error(`[Document] Failed to load resource ${e}:`,u)},[a,t,e,u]),t||!s)return r.jsx(E,{});if(a)return r.jsx(m,{error:u,onRetry:()=>c()});if(!s.resource)return r.jsx(m,{error:new Error("Resource not found"),onRetry:()=>c()});const i=s.resource,l=n(i["@id"]);return r.jsx(L,{resource:i,rUri:l,locale:f,Link:P,routes:S,ToolbarPanels:w,refetchDocument:c,streamStatus:p})}export{q as default};
//# sourceMappingURL=page-B68iiwby.js.map
