import{S as t,i as n,a as i,b as a,s,e,c as o,n as r,d as u,f as l,l as m,g as p,r as f,o as h,j as c}from"./index-6e99513e.js";import*as d from"../../../../../../../../../js/libraries/authTools.js";function g(t){let n,i,s,h,c,d,g,x,b,C,y,v,I,w,j,k,E,T,z,M,O,R,D;return{c(){n=e("div"),i=e("h2"),i.textContent="CONFIRMATION CODE",s=o(),h=e("div"),c=e("input"),d=e("span"),d.textContent="-",g=o(),x=e("input"),b=e("span"),b.textContent="-",C=o(),y=e("input"),v=e("span"),v.textContent="-",I=o(),w=e("input"),j=e("span"),j.textContent="-",k=o(),E=e("input"),T=o(),z=e("span"),M=o(),O=e("button"),O.textContent="Confirm",this.c=r,u(i,"class","auth-title title-highlight"),u(c,"class","authConfirmationInput"),u(c,"type","text"),u(c,"maxlength","1"),u(d,"class","dash"),u(x,"class","authConfirmationInput"),u(x,"type","text"),u(x,"maxlength","1"),u(b,"class","dash"),u(y,"class","authConfirmationInput"),u(y,"type","text"),u(y,"maxlength","1"),u(v,"class","dash"),u(w,"class","authConfirmationInput"),u(w,"type","text"),u(w,"maxlength","1"),u(j,"class","dash"),u(E,"class","authConfirmationInput"),u(E,"type","text"),u(E,"maxlength","1"),u(h,"id","confirmationInputs"),u(z,"id","confirmation-msg"),u(O,"class","auth-button"),u(n,"class","pane auth-pane")},m(e,o){a(e,n,o),l(n,i),l(n,s),l(n,h),l(h,c),t[6](c),l(h,d),l(h,g),l(h,x),t[8](x),l(h,b),l(h,C),l(h,y),t[10](y),l(h,v),l(h,I),l(h,w),t[12](w),l(h,j),l(h,k),l(h,E),t[14](E),l(n,T),l(n,z),t[16](z),l(n,M),l(n,O),t[17](O),R||(D=[m(c,"input",t[7]),m(x,"input",t[9]),m(y,"input",t[11]),m(w,"input",t[13]),m(E,"input",t[15]),m(O,"click",t[18])],R=!0)},p:r,i:r,o:r,d(i){i&&p(n),t[6](null),t[8](null),t[10](null),t[12](null),t[14](null),t[16](null),t[17](null),R=!1,f(D)}}}function x(t,n,i){let a,s,e=[];function o(t,n){n.data in["0","1","2","3","4","5","6","7","8","9"]?t<4?e[t+1].focus():d.confirmEmail(a,r(),u):i(0,e[t].value="",e)}function r(){let t="";for(let n of e)t+=n.value;return parseInt(t)}function u(t){"true"==t?d.toDashboard():i(1,a.innerHTML="Wrong code",a)}h((()=>{}));return[e,a,s,o,r,u,function(t){c[t?"unshift":"push"]((()=>{e[0]=t,i(0,e)}))},t=>o(0,t),function(t){c[t?"unshift":"push"]((()=>{e[1]=t,i(0,e)}))},t=>o(1,t),function(t){c[t?"unshift":"push"]((()=>{e[2]=t,i(0,e)}))},t=>o(2,t),function(t){c[t?"unshift":"push"]((()=>{e[3]=t,i(0,e)}))},t=>o(3,t),function(t){c[t?"unshift":"push"]((()=>{e[4]=t,i(0,e)}))},t=>o(4,t),function(t){c[t?"unshift":"push"]((()=>{a=t,i(1,a)}))},function(t){c[t?"unshift":"push"]((()=>{s=t,i(2,s)}))},()=>d.confirmEmail(a,r(),u)]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",n(this,{target:this.shadowRoot,props:i(this.attributes),customElement:!0},x,g,s,{},null),t&&t.target&&a(t.target,this,t.anchor)}}customElements.define("confirmation-component",b);export{b as default};