1import{d as l,g as d,e as c,b as m,j as e,F as u,S as t,h as x,B as g,i as h,C as p,I as b}from"./index-1e680ce4.js";import{u as j,C as S,P as C}from"./CustomInput-562291b8.js";import{A as w,S as f}from"./SignFooter-7b69f12a.js";import"./use-form-control-83a86c54.js";import"./call-all-41a73786.js";import"./iconBase-6f44f9ff.js";import"./divider-31da8556.js";const v=async(i,r,a,s,n)=>{try{(await l.put("api/teacher/reset-password",{email:i.values.email.toLowerCase()})).status===200&&(s({title:`${n.succeeded}`,description:`${n.mailCode}`,status:"success"}),a&&(localStorage.setItem("email",i.values.email.toLowerCase()),r("/PasswordReset"))),i.handleReset(),i.setSubmitting(!1)}catch{i.setSubmitting(!1),s({title:`${n.innerError}`,description:`${n.userNotFound}`,status:"error"})}};function A(){const i=d(),r=c(),{translation:a}=m(),s=j({initialValues:{email:""},onSubmit:()=>v(s,r,!0,i,a),validationSchema:C});return e.jsxs(u,{minH:"100vh",align:"center",justify:"center",bg:"txt",children:[e.jsxs(t,{spacing:8,mx:"auto",maxW:"lg",px:6,children:[e.jsx(t,{align:"center",children:e.jsx(x,{fontSize:{base:"sm",md:"lg",lg:"xl"},children:a.forGetPassword})}),e.jsx(g,{rounded:"lg",bg:"white",sx:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.2)"},p:8,children:e.jsxs(t,{spacing:4,children:[e.jsx("form",{children:e.jsx(t,{spacing:4,children:e.jsx(S,{id:"email",isRequired:!0,type:"email",value:s.values.email,isDisabled:s.isSubmitting,label:a.email,isInvalid:s.touched.email&&s.errors.email,errorMessage:a[s.errors.email],onChange:s.handleChange("email"),onBlur:s.handleBlur("email"),name:"email"})})}),e.jsxs(t,{spacing:6,children:[e.jsx(h,{isLoading:s.isSubmitting,loadingText:a.sendCode,isDisabled:s.isSubmitting,onClick:s.handleSubmit,children:a.sendCode}),e.jsx(w,{or:a.or}),e.jsx(f,{txt:a.haveAccount,text:a.signIn,to:"/"})]})]})})]}),e.jsx(p,{minH:"100vh",w:"50%",display:{base:"none",md:"flex"},children:e.jsx(b,{src:"/icon.png",boxSize:"sm"})})]})}export{A as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.