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