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