import{a6 as p,a8 as b,c3 as v,ag as F,c4 as V,r as y,as as h,bJ as R,f as P}from"./index.737529e8.1750111005555.js";const k=p({...b(),...v()},"VForm"),C=F()({name:"VForm",props:k(),emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,f){let{slots:n,emit:i}=f;const r=V(o),s=y();function c(t){t.preventDefault(),r.reset()}function l(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(u=>{var m;let{valid:d}=u;d&&((m=s.value)==null||m.submit())}),a.preventDefault()}return h(()=>{var t;return P("form",{ref:s,class:["v-form",o.class],style:o.style,novalidate:!0,onReset:c,onSubmit:l},[(t=n.default)==null?void 0:t.call(n,r)])}),R(r,s)}});export{C as V};
