import{a as p,i as v,H as b}from"./forwardRefs-67412654.js";import{h as F,i as V}from"./VCheckboxBtn-bbfa74a1.js";import{p as h,g as y,r as R,l as P}from"./index-20675090.js";const k=h({...p(),...F()},"VForm"),S=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 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 v(()=>{var t;return P("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)])}),b(a,s)}});export{S as V};
