import{getAllEnvVars as o}from"@clevercloud/client/esm/api/v2/addon.js";import{defineSmartComponent as n}from"./lib/define-smart-component.js";import{sendToApi as e}from"./lib/send-to-api.js";import"./cc-smart-container.js";import"./cc-env-var-form.js";n({selector:'cc-env-var-form[context="env-var-addon"]',params:{apiConfig:{type:Object},ownerId:{type:String},addonId:{type:String}},onContextUpdate({context:n,updateComponent:t,signal:a}){t("state",{type:"loading"});const{apiConfig:i,ownerId:d,addonId:r}=n;(function({apiConfig:n,signal:t,ownerId:a,addonId:i}){return o({id:a,addonId:i}).then(e({apiConfig:n,signal:t}))})({apiConfig:i,signal:a,ownerId:d,addonId:r}).then((o=>{t("state",{type:"loaded",validationMode:"simple",variables:o})})).catch((o=>{console.error(o),t("state",{type:"error"})}))}});
//# sourceMappingURL=cc-env-var-form.smart-env-var-addon.js.map
