import{a9 as p,aT as b,cb as v,ac as F,cc as V,r as y,ae as h,z as R,af as P}from"./D6By_0qX.js";const k=p({...b(),...v()},"VForm"),D=F()({name:"VForm",props:k(),emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,c){let{slots:n,emit:f}=c;const r=V(o),s=y();function i(t){t.preventDefault(),r.reset()}function l(t){const a=t,e=r.validate();a.then=e.then.bind(e),a.catch=e.catch.bind(e),a.finally=e.finally.bind(e),f("submit",a),a.defaultPrevented||e.then(u=>{var m;let{valid:d}=u;d&&((m=s.value)==null||m.submit())}),a.preventDefault()}return h(()=>{var t;return R("form",{ref:s,class:["v-form",o.class],style:o.style,novalidate:!0,onReset:i,onSubmit:l},[(t=n.default)==null?void 0:t.call(n,r)])}),P(r,s)}});export{D as V};
