(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{679:(e,i,n)=>{Promise.resolve().then(n.bind(n,6001))},6001:(e,i,n)=>{"use strict";n.d(i,{Login:()=>j});var s=n(5155),l=n(2115);n(1846);var o=n(5565),t=n(6046),a=n(2663),r=n(6530),c=n(592),d=n(8897),g=n.n(d),m=n(8035),h=n(7102),v=n(5545),u=n(773),x=n(9420);let j=()=>{let e=(0,c.j)(),[i,n]=(0,l.useState)(!1),[d,j]=(0,l.useState)(""),[p,N]=(0,l.useState)(""),[w,b]=(0,l.useState)(!1),k=(0,t.useRouter)(),f=async()=>{if(!d||!p){g().fire({icon:"warning",title:"Informations manquantes",text:"Veuillez saisir votre e-mail et votre mot de passe",confirmButtonText:"OK"});return}b(!0);try{await e((0,a.Lx)({email:d,password:p,language:"en"})).unwrap(),g().fire({title:"Bienvenue",icon:"success",showConfirmButton:!1,timer:1500}).then(()=>{e((0,r.qX)()).unwrap(),k.push("/home")})}catch(e){g().fire({icon:"error",title:"\xc9chec de la connexion",text:"Email ou mot de passe invalide",confirmButtonText:"OK"}),console.error("Login error:",e)}finally{b(!1)}};return(0,s.jsxs)("div",{className:"split-container-loginpage",children:[(0,s.jsxs)("div",{className:"white-section-login",children:[(0,s.jsxs)("div",{style:{marginTop:"-4vh"},children:[(0,s.jsx)("div",{className:"login-top-line-mobile",children:"Plongez dans les \xe9v\xe9nements de votre coin !".split(" ").slice(0,3).join(" ")}),(0,s.jsx)("div",{className:"top-line-bottom-login-mobile",children:"Plongez dans les \xe9v\xe9nements de votre coin !".split(" ").slice(3).join(" ")})]}),(0,s.jsx)("div",{className:"logo-container-login",children:(0,s.jsx)(o.default,{src:"/login/login_2.png",alt:"Logo de l'entreprise",width:180,height:80,className:"logo"})}),(0,s.jsxs)("div",{className:"color-blocks-container",children:[i?(0,s.jsx)(m.p,{email:d,password:p,isLoading:w,onEmailChange:j,onPasswordChange:N,onForgotPasswordClick:()=>{window.location.href="/forgot-password"},onLoginClick:f,onBackClick:()=>{n(!1)}}):(0,s.jsx)(x.A,{handleMailLoginClick:()=>{n(!0)}}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.U,{}),(0,s.jsx)(v.N,{}),(0,s.jsx)(u.j,{})]})]}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"conti-guest-login",children:(0,s.jsx)("div",{className:"guest-text",children:"Continuer en tant qu'invit\xe9"})}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"color-blocks-container-login-online",children:(0,s.jsx)("div",{className:"color-block-login block-blue-login-online",children:(0,s.jsx)("div",{className:"block-blue-text-content-online",onClick:()=>k.push("/register"),children:(0,s.jsx)("div",{className:"primary-blue-text-online-login",style:{textAlign:"center"},children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:"Ouvrez votre compte"}),(0,s.jsx)("div",{children:"100% gratuit et sans engagement"})]})})})})})})]})]}),(0,s.jsxs)("div",{className:"blue-section-login",children:[(0,s.jsxs)("div",{className:"top-right-text-login",children:[(0,s.jsx)("div",{className:"login-top-line",children:"Plongez dans les \xe9v\xe9nements de votre coin !".split(" ").slice(0,4).join(" ")}),(0,s.jsx)("div",{className:"top-line-bottom-loginn",children:"Plongez dans les \xe9v\xe9nements de votre coin !".split(" ").slice(4).join(" ")}),(0,s.jsx)("div",{className:"top-middle-line-login",children:"Votre prochain coup de cœur est au coin de la rue."}),(0,s.jsx)("div",{className:"top-middle-line-other-againlogin",children:"Red\xe9couvrez votre quartier sous un nouveau jour."}),(0,s.jsx)("div",{className:"top-middle-line-other1-login1"})]}),(0,s.jsx)("div",{className:"background-image-container-login",children:(0,s.jsx)(o.default,{src:"/login/login_1.png",alt:"Arri\xe8re-plan",fill:!0,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",className:"background-image",priority:!1})})]})]})}}},e=>{var i=i=>e(e.s=i);e.O(0,[7189,8320,505,2651,5565,6578,8441,1517,7358],()=>i(679)),_N_E=e.O()}]);