import{$ as e,Gt as t,on as n}from"./src-DTHkTkyy-Ce1TZuRw.js";import{S as r}from"./connect-BSkeWkEI-BYzoVZOI.js";import{t as i}from"./useRegistryPackages-BOX4NMAb-DVr04Tdy.js";import{jsx as a}from"react/jsx-runtime";function o(){let o=t(),{registryPackageList:s,updateRegistryPackageStatus:c}=i(),l=n(),u=o?.type===`missingPackage`?o.documentType:void 0;if(!l||!u)return null;let d=s.filter(e=>e.documentTypes.includes(u)).map(e=>({documentType:u,packageName:e.name}));async function f(e){(await l?.addPackage(e))?.type===`success`&&c(e,`registry-install`)}function p(e){c(e,`dismissed`)}return a(r,{pendingInstallations:d,onInstall:f,onDismiss:p,onOpenChange:t=>{if(!t)return e()}})}export{o as ConnectMissingPackageModal};
//# sourceMappingURL=MissingPackageModal-BfblPbd8-BiOwrk1u.js.map