import{i as t}from"./_virtual___federation_fn_import-DB-0B1B_.js";import{j as a}from"./jsx-runtime-u17CrQMm.js";import{z as c}from"./index-KpBDpTrU.js";import"./sortable-list-BlHb6Qrt.js";import{E as u}from"./error-boundary-DgBD6_Zp.js";const{getPluginMetadataByKeyOrThrow:p,pluginEntityType:s}=await t("@baseplate-dev/project-builder-lib"),{useProjectDefinition:m}=await t("@baseplate-dev/project-builder-lib/web"),{buttonVariants:g,NavigationMenu:x,NavigationMenuItem:y,NavigationMenuLink:h,NavigationMenuList:b,SidebarLayout:j,SidebarLayoutContent:f,SidebarLayoutSidebar:v}=await t("@baseplate-dev/ui-components"),{notEmpty:N}=await t("@baseplate-dev/utils"),{Link:r,Outlet:k}=await t("@tanstack/react-router");function B(){const{definition:o,schemaParserContext:i}=m(),{availablePlugins:l}=i.pluginStore,n=(o.plugins??[]).filter(e=>!p(i.pluginStore,s.keyFromId(e.id)).managedBy).map(e=>l.find(d=>d.metadata.key===s.keyFromId(e.id))?.metadata).filter(N);return a.jsxs(j,{className:"flex-1",children:[a.jsxs(v,{className:"flex flex-col gap-4",width:"sm",children:[a.jsxs(r,{to:"/plugins",className:g({variant:"secondary",className:"w-full"}),children:[a.jsx(c,{}),"Manage plugins"]}),a.jsx(x,{orientation:"vertical",children:a.jsxs(b,{children:[n.map(e=>a.jsx(h,{render:a.jsx(r,{to:"/plugins/edit/$key",params:{key:e.key}}),children:e.displayName},e.key)),n.length===0&&a.jsx(y,{className:"mt-4 w-full text-center opacity-80",children:"No plugins enabled"})]})})]}),a.jsx(f,{className:"h-[calc(100vh-var(--topbar-height)-1px)]",children:a.jsx(u,{children:a.jsx(k,{})})})]})}export{B as component};
//# sourceMappingURL=route-KWADAgsy.js.map
