import{r as t,c as e}from"./p-5ab6b26f.js";class r{constructor(r){t(this,r),this.modalCtrl=e(this,"ion-modal-controller")}async create(t,e){let r=document.createElement("gl-form");r.feature=t;for(let t in e)r[t]=e[t];const o=await this.modalCtrl.create({component:r});return await o.present(),await new Promise(e=>{r.addEventListener("glFormCancel",()=>{o.dismiss(),e()}),r.addEventListener("glFormSubmit",()=>{o.dismiss(),e(t)})})}}export{r as gl_form_controller};