import{g as d,p,H as b,b as v,d as y,n as F,e as V,am as h,c as R}from"./index-C-Ivu3jU.js";import{e as P,f as k}from"./VInput-CnrZS6Kh.js";const C=p({...R(),...k()},"VForm"),z=d()({name:"VForm",props:C(),emits:{"update:modelValue":a=>!0,submit:a=>!0},setup(a,n){let{slots:m,emit:l}=n;const o=P(a),s=b();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 v(()=>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};
