import{S as t,i as e,a as s,b as o,k as n,s as a,e as i,c as u,n as l,d as r,f as c,l as d,g as m,r as p,m as h,o as f,j as g}from"./index-6e99513e.js";import*as b from"../../../../../../../../../js/libraries/authTools.js";function w(t){let e,s,n,a,h,f,g,b,w,y,x,I,k,v,E,$,j,C,L,T,P,B,G,H,M;return{c(){e=i("div"),s=i("h2"),s.textContent="LOG IN",n=u(),a=i("label"),a.textContent="Email ",h=i("span"),f=u(),g=i("input"),b=u(),w=i("div"),y=i("label"),y.textContent="Password ",x=i("span"),I=u(),k=i("input"),v=u(),E=i("button"),E.innerHTML='',$=u(),j=i("div"),C=i("input"),L=i("label"),L.textContent="remember me",T=u(),P=i("button"),P.textContent="Log in",B=u(),G=i("a"),G.textContent="Forgot password?",this.c=l,r(s,"class","auth-title"),r(a,"class","auth-label"),r(a,"for","emailInput"),r(h,"id","email-msg"),r(g,"id","emailInput"),r(g,"class","authEmailInput"),r(g,"type","email"),r(y,"class","auth-label"),r(y,"for","passwordInput"),r(x,"id","password-msg"),r(k,"id","passwordInput"),r(k,"class","authPasswordInput"),r(k,"type","password"),r(E,"class","eye-icon"),r(w,"class","password-field"),r(C,"type","checkbox"),r(C,"id","remember-me-checkbox"),r(L,"id","remember-me-label"),r(L,"for","passwordInput"),r(j,"id","remember-me"),r(P,"class","auth-button"),r(G,"id","forgot-password"),r(G,"href","forgot-password"),r(e,"id","login-group"),r(e,"class","pane auth-pane")},m(i,u){o(i,e,u),c(e,s),c(e,n),c(e,a),c(e,h),t[9](h),c(e,f),c(e,g),t[10](g),c(e,b),c(e,w),c(w,y),c(w,x),t[11](x),c(w,I),c(w,k),t[12](k),c(w,v),c(w,E),t[13](E),c(e,$),c(e,j),c(j,C),t[15](C),c(j,L),c(e,T),c(e,P),c(e,B),c(e,G),H||(M=[d(E,"click",t[14]),d(P,"click",t[16])],H=!0)},p:l,i:l,o:l,d(s){s&&m(e),t[9](null),t[10](null),t[11](null),t[12](null),t[13](null),t[15](null),H=!1,p(M)}}}function y(t,e,s){let o,n,a,i,u,l,r,c,d,{focused:m=!1}=e,p=h("auth");function w(){if(p.googleInit){google.accounts.id.renderButton(d,{theme:"outline",size:"large"});let t=d.getElementsByTagName("iframe")[0];t.style.height="5rem",t.style.width="5rem"}else setTimeout(w,100)}f((()=>{s(7,c.checked=!0,c),s(2,a={email:o,password:n,remember:c}),s(6,r={email:u,password:l}),p.msgs=r,p.remember=c,p.loginGoogle=d,document.addEventListener("keypress",(function(t){"Enter"==t.code&&m&&b.login(r,a)})),w()}));return t.$$set=t=>{"focused"in t&&s(8,m=t.focused)},[o,n,a,i,u,l,r,c,m,function(t){g[t?"unshift":"push"]((()=>{u=t,s(4,u)}))},function(t){g[t?"unshift":"push"]((()=>{o=t,s(0,o)}))},function(t){g[t?"unshift":"push"]((()=>{l=t,s(5,l)}))},function(t){g[t?"unshift":"push"]((()=>{n=t,s(1,n)}))},function(t){g[t?"unshift":"push"]((()=>{i=t,s(3,i)}))},()=>b.changePasswordVisibility(i),function(t){g[t?"unshift":"push"]((()=>{c=t,s(7,c)}))},()=>b.login(r,a)]}class x extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},y,w,a,{focused:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[8]}set focused(t){this.$$set({focused:t}),n()}}customElements.define("login-component",x);export{x as default};