import{A as p,B as v,g as b,I as F,P as V,d as y}from"./main-CJbVOHh0.js";import{i as h,j as P}from"./VInput-DB7cgrUt.js";import{f as R}from"./forwardRefs-D3j0TLhE.js";const k=v({...V(),...P()},"VForm"),S=p()({name:"VForm",props:k(),emits:{"update:modelValue":r=>!0,submit:r=>!0},setup(r,i){let{slots:n,emit:f}=i;const a=h(r),s=b();function l(t){t.preventDefault(),a.reset()}function u(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 F(()=>{var t;return y("form",{ref:s,class:["v-form",r.class],style:r.style,novalidate:!0,onReset:l,onSubmit:u},[(t=n.default)==null?void 0:t.call(n,a)])}),R(a,s)}});export{S as V};
