import{r as registerInstance,h,H as Host}from"./index-ecdfb761.js";import{B as BaseField}from"./BaseField-0b01dc2c.js";import"./index-150b6a59.js";import{i as injectContext}from"./index-55e25e41.js";import"./FieldGenerator-3ae403b2.js";import"./context-c50e1599.js";import"./state-tunnel-04c0b67a.js";var DvnMemberInfoForm=function(){function e(e){var t=this;registerInstance(this,e);this.onSubmit=function(e){var n=e.detail.values;t.progressing=true;t.apiUye.updateMembership(t.membership.config._id,t.membership._id,n).then(t.onUpdateSucceed,t.onUpdateFail).finally((function(){return t.progressing=false}))};this.onUpdateSucceed=function(){t.appContextInvalidator()};this.onUpdateFail=function(e){t.error=e}}e.prototype.render=function(){var e=this,t=e.membership,n=e.progressing;if(!t){return null}return h(Host,{class:"d-block"},h("doldurma-form",{fields:t.config.fields.filter((function(e){return e.id!=="user"})).map((function(e){return BaseField.decode(Object.assign(Object.assign({},e),{value:t[e.id]}))})),onSubmit:this.onSubmit,submitButtonLabel:"Save",progressing:n}))};return e}();injectContext(DvnMemberInfoForm);export{DvnMemberInfoForm as dvn_member_info_form};