1import{j as e}from"./vendor-ui-Cc3LfMzt.js";import{r as n,L as u}from"./vendor-react-CRevFlg9.js";import{u as j,h as k,S as y,q as N,A as w,a as D}from"./index-CJYdpUa3.js";import{C as S}from"./circle-check-big-BxPTYy0p.js";import"./vendor-supabase-DRR_Es6B.js";const l=[{id:"test",tag:"test-denekt",titre:"Tester Denekt",desc:"Vous vous portez volontaire pour utiliser Denekt pendant sa phase de test.",confirmation:"Votre volontariat pour tester Denekt est enregistré. Vous serez contacté avant le test."},{id:"information",tag:"activation-denekt",titre:"Recevoir l'information",desc:"Vous voulez seulement savoir quand Denekt est activé.",confirmation:"Votre demande est enregistrée. Vous recevrez un message à l'activation de Denekt, rien d'autre."}],z=()=>{j();const[a,m]=n.useState(null),[s,x]=n.useState(""),[o,f]=n.useState(""),[d,c]=n.useState(!1),[p,g]=n.useState(null),{toast:h}=k(),r=l.find(t=>t.id===a)??null,i=l.find(t=>t.id===p)??null,b=async t=>{if(t.preventDefault(),!r||!s.trim()||!o.trim())return;c(!0);const{error:v}=await D.rpc("record_intention",{_first_name:s.trim(),_email:o.trim().toLowerCase(),_tag:r.tag});if(c(!1),v){h({title:"Enregistrement indisponible",description:"Rien n'a été enregistré. Vous pouvez réessayer dans un moment.",variant:"destructive"});return}g(r.id),window.scrollTo({top:0})};return e.jsxs("div",{className:"imprint imprint-depot min-h-screen bg-background",children:[e.jsx(y,{title:"Tester Denekt ou recevoir l'information",description:"Denekt n'est pas encore ouvert. Deux choix : se porter volontaire pour le tester, ou demander l'information de son activation.",path:"/qualifier",jsonLd:N}),e.jsxs("div",{className:"max-w-xl mx-auto px-6 pt-28 pb-16",children:[e.jsx(u,{to:"/",className:"font-serif text-lg text-foreground hover:text-accent transition-colors",children:"Denekt"}),e.jsxs("div",{className:"mt-12",children:[e.jsx("p",{className:"font-sans text-[11px] font-medium tracking-[0.25em] uppercase text-accent mb-2",children:"Avant l'ouverture"}),i?e.jsxs("div",{className:"animate-fade-in py-4",children:[e.jsx("h1",{className:"font-serif text-xl md:text-2xl font-light text-foreground mb-4 leading-snug",children:i.titre}),e.jsxs("p",{className:"flex items-start gap-3 text-sm text-foreground leading-relaxed mb-8",children:[e.jsx(S,{className:"w-4 h-4 text-accent shrink-0 mt-0.5","aria-hidden":!0}),i.confirmation]}),e.jsx(u,{to:"/",className:"text-sm text-accent hover:text-foreground transition-colors underline underline-offset-4",children:"Retour au site"})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"font-serif text-xl md:text-2xl font-light text-foreground mb-2 leading-snug",children:"Denekt n'est pas encore ouvert."}),e.jsx("p",{className:"text-sm text-muted-foreground mb-8 leading-relaxed",children:"Deux choix, deux conséquences différentes."}),e.jsx("div",{className:"space-y-3",role:"group","aria-label":"Choisir une intention",children:l.map(t=>e.jsxs("button",{type:"button",onClick:()=>m(t.id),"aria-pressed":a===t.id,className:`w-full text-left px-5 py-4 border rounded-sm text-sm leading-relaxed transition-all hover:border-accent hover:bg-accent/5 ${a===t.id?"border-accent bg-accent/10 text-foreground":"border-border text-foreground/80"}`,children:[t.titre,e.jsx("span",{className:"block text-xs text-muted-foreground mt-1",children:t.desc})]},t.id))}),r&&e.jsxs("form",{onSubmit:b,className:"mt-8 space-y-4 animate-fade-in",children:[e.jsx("input",{type:"text",placeholder:"Prénom","aria-label":"Prénom",value:s,onChange:t=>x(t.target.value),required:!0,className:"w-full px-4 py-3.5 border border-border rounded-sm bg-background text-foreground text-sm placeholder:text-muted-foreground focus:outline-none focus:border-accent transition-colors"}),e.jsx("input",{type:"email",placeholder:"Email","aria-label":"Adresse email",value:o,onChange:t=>f(t.target.value),required:!0,className:"w-full px-4 py-3.5 border border-border rounded-sm bg-background text-foreground text-sm placeholder:text-muted-foreground focus:outline-none focus:border-accent transition-colors"}),e.jsxs("button",{type:"submit",disabled:d||!s.trim()||!o.trim(),className:"w-full px-5 py-3.5 text-xs font-sans font-medium tracking-[0.1em] uppercase bg-primary text-primary-foreground rounded-sm hover:opacity-90 transition-opacity disabled:opacity-30 inline-flex items-center justify-center gap-2",children:[d?"Enregistrementâ¦":r.titre,e.jsx(w,{className:"w-3.5 h-3.5"})]})]})]})]})]})]})};export{z 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.