"use strict";exports.id=6644,exports.ids=[6644],exports.modules={66644:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{l:()=>Form});var o=t(20997),a=t(45641),l=t(61908),u=t(16689),c=e([a,l]);[a,l]=c.then?(await c)():c;let Form=({onSubmit:e,children:r,useFormProps:t,validationSchema:s,serverError:c,resetFields:i,...m})=>{let n=(0,a.useForm)({...t,...s&&{resolver:(0,l.yupResolver)(s)}});return(0,u.useEffect)(()=>{c&&Object.entries(c).forEach(([e,r])=>{n.setError(e,{type:"manual",message:r})})},[c,n]),(0,u.useEffect)(()=>{i&&n.reset(i)},[i,n]),o.jsx("form",{noValidate:!0,onSubmit:n.handleSubmit(e),...m,children:r(n)})};s()}catch(e){s(e)}})}};