import{i as a}from"./_virtual___federation_fn_import-DB-0B1B_.js";import{j as t}from"./jsx-runtime-u17CrQMm.js";import{a as b}from"./error-formatter-B41KnHG1.js";const{PluginUtils:h}=await a("@baseplate-dev/project-builder-lib"),{useProjectDefinition:j}=await a("@baseplate-dev/project-builder-lib/web"),{Button:o,Item:y,ItemActions:f,ItemContent:p,ItemDescription:g,ItemGroup:x,ItemTitle:k}=await a("@baseplate-dev/ui-components"),{Link:v}=await a("@tanstack/react-router"),{useState:C}=await a("react");function D({dependencies:r,onNavigate:l}){const{saveDefinitionWithFeedback:c,definitionContainer:m,isSavingDefinition:d}=j(),[n,s]=C(null);function u(e){s(e.metadata.key),c(i=>{h.setPluginConfig(i,e.metadata,{},m)},{successMessage:`Enabled ${e.metadata.displayName}!`}).finally(()=>{s(null)}).catch(i=>{b(i)})}return t.jsx(x,{children:r.map(e=>t.jsxs(y,{variant:"outline",children:[t.jsxs(p,{children:[t.jsx(k,{children:e.metadata.displayName}),t.jsx(g,{children:e.metadata.description})]}),t.jsx(f,{children:e.hasWebConfig?t.jsx(v,{to:"/plugins/edit/$key",params:{key:e.metadata.key},onClick:l,children:t.jsx(o,{variant:"secondary",size:"sm",children:"Configure"})}):t.jsx(o,{variant:"secondary",size:"sm",disabled:d||n!==null,onClick:()=>{u(e)},children:n===e.metadata.key?"Enabling...":"Enable"})})]},e.metadata.key))})}export{D as U};
//# sourceMappingURL=unmet-dependency-list-3dCQIFKG.js.map
