1import{j as e}from"./vendor-ui-Co8xXcZ5.js";import{h as m,u,r as p}from"./vendor-react-BLS9mCXK.js";import{u as x,B as l,b as f,R as h,s as v}from"./index-CFjSbJ-K.js";import{C as g}from"./card-DFEEGsLE.js";import{B as j}from"./BernardLogo-BClj2i_5.js";import{M as y}from"./mail-C_Xn7R7l.js";import{A as N}from"./arrow-left-B6jC3qyF.js";import"./vendor-charts-BjUneCK4.js";import"./vendor-query-BkA7SkCw.js";import"./vendor-supabase-vdXWJR_5.js";const F=()=>{const i=m(),c=u(),{toast:r}=x(),t=c.state?.email??"",[a,n]=p.useState(!1),d=async()=>{if(!t){r({title:"Adresse manquante",description:"Retournez à l'inscription pour renvoyer l'email.",variant:"destructive"});return}n(!0);try{const{error:s}=await v.auth.resend({type:"signup",email:t,options:{emailRedirectTo:`${window.location.origin}/auth/confirmed`}});if(s)throw s;r({title:"Email renvoyé",description:"Un nouvel email de confirmation vient d'être envoyé."})}catch(s){const o=String(s?.message||"");o.toLowerCase().includes("already")||o.toLowerCase().includes("confirmed")?(r({title:"Email déjà confirmé",description:"Votre compte est déjà actif. Connectez-vous."}),i("/login/client")):r({title:"Impossible de renvoyer l'email",description:s?.message||"Veuillez réessayer dans un instant.",variant:"destructive"})}finally{n(!1)}};return e.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-6 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,hsl(var(--primary)/0.1),transparent_70%)]"}),e.jsxs(g,{className:"relative w-full max-w-md p-8 space-y-6",children:[e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx(j,{}),e.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center",style:{backgroundColor:"rgba(90, 129, 193, 0.15)"},children:e.jsx(y,{className:"w-8 h-8",style:{color:"#5A81C1"}})}),e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("h1",{className:"font-display text-2xl font-bold text-foreground",children:"Vérifiez votre adresse email"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Merci pour votre inscription. Nous venons d'envoyer un email de confirmation",t?e.jsxs(e.Fragment,{children:[" ","à ",e.jsx("span",{className:"text-foreground font-medium",children:t})]}):null,". Cliquez sur le lien reçu pour activer votre compte Bernard ONE."]})]})]}),e.jsxs("div",{className:"rounded-lg border border-border/50 bg-muted/20 p-4 text-xs text-muted-foreground space-y-1",children:[e.jsx("p",{children:"⢠Pensez à vérifier vos courriers indésirables."}),e.jsx("p",{children:"⢠Le lien est valable 1 heure et à usage unique."}),e.jsx("p",{children:"⢠L'email provient de [email protected]."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(l,{onClick:d,disabled:a,className:"w-full text-white hover:opacity-90",style:{backgroundColor:"#5A81C1"},children:a?e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"w-4 h-4 animate-spin mr-2"}),"Envoi en cours..."]}):e.jsxs(e.Fragment,{children:[e.jsx(h,{className:"w-4 h-4 mr-2"}),"Renvoyer l'email"]})}),e.jsxs(l,{variant:"outline",onClick:()=>i("/login/client"),className:"w-full",children:[e.jsx(N,{className:"w-4 h-4 mr-2"}),"Retour à la connexion"]})]})]})]})};export{F 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.