import{B as d,C as p,r as v,G as b,a as y,H as F,n as V,aJ as h,K as R}from"./index-Bn2Tzsay.js";import{f as C,g as P}from"./VInput-C_1AW61Q.js";const k=p({...R(),...P()},"VForm"),z=d()({name:"VForm",props:k(),emits:{"update:modelValue":a=>!0,submit:a=>!0},setup(a,n){let{slots:m,emit:l}=n;const o=C(a),s=v();function i(r){r.preventDefault(),o.reset()}function f(r){const t=r,e=o.validate();t.then=e.then.bind(e),t.catch=e.catch.bind(e),t.finally=e.finally.bind(e),l("submit",t),t.defaultPrevented||e.then(u=>{let{valid:c}=u;c&&s.value?.submit()}),t.preventDefault()}return b(()=>y("form",{ref:s,class:V(["v-form",a.class]),style:F(a.style),novalidate:!0,onReset:i,onSubmit:f},[m.default?.(o)])),h(o,s)}});export{z as V};
