import{getAddon as n,getJenkinsUpdates as i}from"@clevercloud/client/esm/api/v4/addon-providers.js";import{sendToApi as e}from"./lib/send-to-api.js";import{defineSmartComponent as o}from"./lib/smart/define-smart-component.js";import"./cc-smart-container.js";import"./cc-jenkins-info.js";o({selector:"cc-jenkins-info",params:{apiConfig:{type:Object},addonId:{type:String}},onContextUpdate({context:o,updateComponent:t,signal:a}){const{apiConfig:s,addonId:r}=o;t("state",{type:"loading"}),function({apiConfig:o,signal:t,addonId:a}){return Promise.all([n({providerId:"jenkins",addonId:a}).then(e({apiConfig:o,signal:t})),i({addonId:a}).then(e({apiConfig:o,signal:t}))]).then((([n,i])=>({jenkinsLink:`https://${n.host}`,jenkinsManageLink:i.manageLink,versions:i.versions})))}({apiConfig:s,signal:a,addonId:r}).then((n=>{t("state",{type:"loaded",jenkinsLink:n.jenkinsLink,jenkinsManageLink:n.jenkinsManageLink,versions:n.versions})})).catch((n=>{console.error(n),t("state",{type:"error"})}))}});
//# sourceMappingURL=cc-jenkins-info.smart.js.map
