import{r as i,e as t,h as o}from"./p-a89095f5.js";const e=class{constructor(o){i(this,o),this.fireenjinTrigger=t(this,"fireenjinTrigger",7),this.pageTitle="Sample Data",this.name="sampleData",this.language=void 0,this.value=void 0,this.endpoint=void 0,this.documentId=void 0,this.outputObject=!0,this.beforeSubmit=void 0}async onSubmit(){this.fireenjinTrigger.emit({name:"closeModal"})}render(){return[o("ion-header",null,o("ion-toolbar",null,o("ion-title",null,this.pageTitle||"Sample Data"),o("ion-buttons",{slot:"end"},this.documentId&&o("ion-button",{onClick:()=>this.formEl.submit()},o("ion-icon",{slot:"icon-only",name:"save"})),o("ion-button",{onClick:()=>this.fireenjinTrigger.emit({name:"closeModal"})},o("ion-icon",{slot:"icon-only",name:"close-circle-outline"}))))),o("ion-content",{style:{"--background":"var(--ion-color-base)"}},o("fireenjin-form",{ref:i=>this.formEl=i,endpoint:this.endpoint,documentId:this.documentId,beforeSubmit:this.beforeSubmit,hideControls:!0},o("fireenjin-code-editor",{name:this.name||"sampleData",language:this.language||"json",value:this.value,outputObject:this.outputObject})))]}};e.style="fireenjin-mx-modal-code-editor fireenjin-code-editor{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;min-height:100%;min-width:100%}";export{e as fireenjin_mx_modal_code_editor}