import{m as p,c as v}from"./VListItem-DC0X47Q4.js";import{j as b,k as F}from"./VCheckboxBtn-DvMOQpng.js";import{f as V}from"./VMenu-7bd_kTRb.js";import{p as y,k as h,r as k,f as R}from"./index-BcUYXcPq.js";const P=y({...p(),...b()},"VForm"),j=h()({name:"VForm",props:P(),emits:{"update:modelValue":r=>!0,submit:r=>!0},setup(r,f){let{slots:n,emit:i}=f;const a=F(r),m=k();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),i("submit",o),o.defaultPrevented||e.then(c=>{var s;let{valid:d}=c;d&&((s=m.value)==null||s.submit())}),o.preventDefault()}return v(()=>{var t;return R("form",{ref:m,class:["v-form",r.class],style:r.style,novalidate:!0,onReset:l,onSubmit:u},[(t=n.default)==null?void 0:t.call(n,a)])}),V(a,m)}});export{j as V};
