import{r as m,aF as i,a as l}from"./index-CHTXMeh8.js";const d=o=>{const r=m(),c=m(),t=async()=>{await i();const a=l(r);return a||console.error("The form is not registered. Please use the register method to register"),a},n={setProps:async(a={})=>{const e=await t();e==null||e.setProps(a),a.model&&(e==null||e.setValues(a.model))},setValues:async a=>{const e=await t();e==null||e.setValues(a)},setSchema:async a=>{const e=await t();e==null||e.setSchema(a)},addSchema:async(a,e)=>{const s=await t();s==null||s.addSchema(a,e)},delSchema:async a=>{const e=await t();e==null||e.delSchema(a)},getFormData:async()=>{const a=await t();return a==null?void 0:a.formModel}};return o&&n.setProps(o),{register:(a,e)=>{r.value=a,c.value=e},elFormRef:c,methods:n}};export{d as u};