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