import{c5 as C,cZ as n,v as a,y as f,o as h,b as r,n as E}from"./index-6Jqoo2rk.js";import{u as b,s as l,B as w}from"./bootstrapIm-BS8HLnlI.js";import{C as y,w as I}from"./emailSetup-CFcJlzt-.js";import{M as o}from"./mediaHeader-B5k-4_FU.js";import{f as L}from"./focusWhenConnected-14rkj1jb.js";import{A as v}from"./AuthCard-Cghujz7c.js";import"./iconTsx-Cr8T7ZIv.js";import"./transition-DuxZkCEv.js";import"./animations-O3syBkMX.js";function x(c){const{managers:m,navigate:p,toIm:d}=b(),u=C.isMobile?100:130,t=document.createElement("div");t.classList.add(l.errorLabel);const e=new y({length:6,onChange:()=>{e.error=!1,n(t,"")},onFill:g=>{m.passwordManager.confirmPasswordResetEmail(g).then(()=>{d()}).catch(i=>{e.error=!0,e.value="",i.type==="CODE_INVALID"?n(t,a("PHONE_CODE_INVALID")):(console.log("error",i),n(t,a("Error.AnError")))})}});let s;return f(()=>{s=L(e.input)}),h(()=>{s?.(),e.cleanup()}),r(v,{get class(){return l.pageEmailRecover},get header(){return r(o,{get children(){return[r(o.Sticker,{name:"Mailbox",size:u}),r(o.Title,{get children(){return a("Login.ResetPassword.Title")}}),r(o.Subtitle,{get children(){return a("Login.ResetPassword.Subtitle",[I(c.spec.payload.email_pattern)])}})]}})},get children(){return[E(()=>e.container),t,r(w,{class:"btn-primary btn-secondary btn-primary-transparent primary",onClick:()=>p({name:"password"}),text:"Login.ResetPassword.Cancel"})]}})}export{x as default};
//# sourceMappingURL=EmailRecoverCard-C1w8YgBI.js.map
