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-28758765.js";import"./FieldGenerator-3ae403b2.js";import"./state-tunnel-04c0b67a.js";var DvnMemberInfoForm=function(){function e(e){var n=this;registerInstance(this,e);this.onSubmit=function(e){var t=e.detail.values;n.progressing=true;n.apiUye.updateMembership(n.membership.config._id,n.membership._id,t).then(n.onUpdateSucceed,n.onUpdateFail).finally((function(){return n.progressing=false}))};this.onUpdateSucceed=function(){n.appContextInvalidator()};this.onUpdateFail=function(e){n.error=e}}e.prototype.render=function(){var e=this,n=e.membership,t=e.progressing;if(!n){return null}return h(Host,{class:"d-block"},h("doldurma-form",{fields:n.config.fields.filter((function(e){return e.id!=="user"})).map((function(e){return BaseField.decode(Object.assign(Object.assign({},e),{value:n[e.id]}))})),onSubmit:this.onSubmit,submitButtonLabel:"Save",progressing:t}))};return e}();injectContext(DvnMemberInfoForm);export{DvnMemberInfoForm as dvn_member_info_form};