import{c as o,u as w,g as P,e as B,h as D,i as k,k as x,j as C,R as E,l as L}from"./index-Bsr9DJ3G.js";import{r as u}from"./vendor-DJo4KD8w.js";import{u as N}from"./routing-DCIgrT7s.js";import{T as F}from"./ToolbarPanels-CPoZvoTB.js";import{u as M}from"./i18n-BbpF47i1.js";import"./XMarkIcon-KMKD47CF.js";function q(){var i;const{t:l}=M(),e=(s,$)=>l(`Discover.${s}`,$),r=N(),m=(i=o(w().activeSession$))==null?void 0:i.client,h=P(),t=B(()=>L(m,h)),g=o(t.browse.activePanel$)??null,d=o(t.recentResources$)??[],p=o(t.entityTypes$)??[],R=o(t.isLoadingRecent$)??!0,v=o(t.search.query$)??"",n=o(t.search.state$),b=(n==null?void 0:n.results)??[],y=(n==null?void 0:n.isSearching)??!1,{theme:S,setTheme:c,resolvedTheme:T}=D(),{showLineNumbers:f,toggleLineNumbers:a}=k();return x({"settings:theme-changed":u.useCallback(({theme:s})=>c(s),[c]),"settings:line-numbers-toggled":u.useCallback(()=>a(),[a])}),C.jsx(E,{recentDocuments:d,searchDocuments:b,entityTypes:p,isLoadingRecent:R,isSearching:y,searchQuery:v,onSearchQueryChange:t.search.setQuery,theme:T,showLineNumbers:f,activePanel:g,onNavigateToResource:s=>r.push(`/know/resource/${encodeURIComponent(s)}`),onNavigateToCompose:()=>r.push("/know/compose"),translations:{title:e("title"),subtitle:e("subtitle"),searchPlaceholder:e("searchPlaceholder"),searchButton:e("searchButton"),searching:e("searching"),filterByEntityType:e("filterByEntityType"),all:e("all"),recentResources:e("recentResources"),searchResults:s=>e("searchResults",{count:s}),documentsTaggedWith:s=>e("documentsTaggedWith",{entityType:s}),noResultsFound:s=>e("noResultsFound",{query:s}),noResourcesAvailable:e("noResourcesAvailable"),composeFirstResource:e("composeFirstResource"),archived:e("archived"),created:e("created"),loadingKnowledgeBase:e("loadingKnowledgeBase")},ToolbarPanels:F})}export{q as default};
//# sourceMappingURL=page-JI9gNkHU.js.map
