import{r as t,c as s,h as i,H as o}from"./p-bace3d90.js";const r=class{constructor(i){t(this,i),this.formEvent=s(this,"formEvent",7),this.formSubmit=s(this,"formSubmit",7),this.sendForm=s(this,"sendForm",7),this.formData={}}handleSubmit(t){if(t.detail.name==this.name){console.info("form submit");const t=Object.assign({},this.formData);this.submitHandler&&this.submitHandler(t),this.sendForm.emit(t)}}receivedFormEvent(t){if(t.detail.name==this.name){const s=Object.assign(Object.assign({},this.formData),{formId:this.name});console.log(s),s[t.detail.key]=t.detail,this.formData=s}}render(){return i(o,{as:"form"},i("form",{name:this.name},i("slot",null)))}};export{r as corejam_form_container}