import{j as n}from"./query-ATBhtd3K.js";import{r as t,O as b}from"./vendor-EnoIVk-c.js";import{g as k,U as g,V as w,X as v,Y as L,F as j}from"./en-IUV4ZXKH-BjYNERUx.js";import{b as S,L as y,a as E}from"./routing-nZgBtxly.js";import{u as p}from"./i18n-BYxb14hm.js";import{F as R}from"./ArrowsRightLeftIcon-CMDe963r.js";import{F as C,a as F}from"./ChevronLeftIcon-CMXd_XZQ.js";import{C as $}from"./CookiePreferences-DxD0u90z.js";import{K as A}from"./privacy-QEJYcmMw.js";import{r as h,L as x}from"./routing-BgsGBuSe.js";import{u as H}from"./useAuth-CqtZE9nt.js";import{u as K}from"./KnowledgeBaseContext-CgnF8K-_.js";import"./index-D4SjcYxX.js";import"./AuthContext-CYne_gJM.js";function M({title:r,titleId:e,...o},s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},o),r?t.createElement("title",{id:e},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}))}const N=t.forwardRef(M);function O({title:r,titleId:e,...o},s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},o),r?t.createElement("title",{id:e},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const T=t.forwardRef(O);function B({title:r,titleId:e,...o},s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},o),r?t.createElement("title",{id:e},r):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))}const D=t.forwardRef(B);function P({href:r,to:e,...o}){return n.jsx(y,{to:r??"",...o})}function U({isCollapsed:r,toggleCollapsed:e,navigationMenu:o}){const{t:s}=p(),a=(d,f)=>s(`Moderation.${d}`,f),{t:m}=p(),c=(d,f)=>m(`Sidebar.${d}`,f),u=S(),i=t.useCallback(()=>{e()},[e]);k({"browse:sidebar-toggle":i});const l=[{name:a("recentResources"),href:"/moderate/recent",icon:T,description:a("recentResourcesDescription")},{name:a("entityTags"),href:"/moderate/entity-tags",icon:D,description:a("entityTagsDescription")},{name:a("tagSchemas"),href:"/moderate/tag-schemas",icon:N,description:a("tagSchemasDescription")},{name:a("linkedData"),href:"/moderate/linked-data",icon:R,description:a("linkedDataDescription")}];return n.jsx(g,{title:a("title"),items:l,currentPath:u,LinkComponent:P,...o&&{dropdownContent:o},isCollapsed:r,icons:{chevronLeft:F,bars:C},collapseSidebarLabel:c("collapseSidebar"),expandSidebarLabel:c("expandSidebar")})}function te(){const{t:r}=p(),e=t.useContext(A),{isAuthenticated:o,isAdmin:s,isModerator:a,token:m}=H(),{activeKnowledgeBase:c}=K(),u=E();return c?n.jsx(w,{token:m,children:n.jsx(v,{baseUrl:c.backendUrl,children:n.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col",children:[n.jsxs("div",{className:"flex flex-1",children:[n.jsx(L,{Link:x,routes:h,t:i=>r(`Navigation.${i}`),tHome:i=>r(`Home.${i}`),brandingLink:"/",collapsible:!0,storageKey:"moderation-sidebar-collapsed",isAuthenticated:o,isAdmin:s,isModerator:a,children:(i,l,d)=>n.jsx(U,{isCollapsed:i,toggleCollapsed:l,navigationMenu:d})}),n.jsx("main",{className:"flex-1 p-6 flex flex-col",children:n.jsx("div",{className:"max-w-7xl mx-auto flex-1 flex flex-col w-full",children:n.jsx(b,{})})})]}),n.jsx(j,{Link:x,routes:h,t:(i,l)=>r(`Footer.${i}`,l),CookiePreferences:$,...(e==null?void 0:e.openKeyboardHelp)&&{onOpenKeyboardHelp:e.openKeyboardHelp}})]})})}):(u.push("/know"),null)}export{te as default};
//# sourceMappingURL=layout-DYXeBZ7E.js.map
