1import{e as j,r as o,g as d,j as e}from"./index-7CL-_GO7.js";function k(){const m=j(),[s,w]=o.useState(""),[l,x]=o.useState(""),[a,u]=o.useState(!1),[c,i]=o.useState(null),[p,g]=o.useState(null),[n,h]=o.useState(!1);o.useEffect(()=>{const{data:t}=d.auth.onAuthStateChange((r,S)=>{(r==="PASSWORD_RECOVERY"||S)&&h(!0)});return d.auth.getSession().then(({data:r})=>{r.session&&h(!0)}),()=>t.subscription.unsubscribe()},[]);const y=async t=>{if(t.preventDefault(),i(null),g(null),s.length<8){i("Wachtwoord moet minstens 8 tekens lang zijn.");return}if(s!==l){i("Wachtwoorden komen niet overeen.");return}u(!0);const{error:r}=await d.auth.updateUser({password:s});if(u(!1),r){i(r.message);return}g("Wachtwoord bijgewerkt. Je wordt doorgestuurdâ¦"),setTimeout(()=>m({to:"/admin"}),1200)};return e.jsx("div",{style:{minHeight:"100vh",display:"grid",placeItems:"center",background:"#f6f4f0",fontFamily:"Inter, system-ui, sans-serif",padding:24},children:e.jsxs("form",{onSubmit:y,style:{background:"white",padding:40,width:"100%",maxWidth:420,boxShadow:"0 10px 40px -10px rgba(0,0,0,0.15)",borderTop:"3px solid #b8a988"},children:[e.jsx("h1",{style:{margin:0,fontSize:24,fontWeight:600},children:"Nieuw wachtwoord instellen"}),e.jsx("p",{style:{marginTop:8,color:"#666",fontSize:14},children:n?"Kies een nieuw wachtwoord voor je admin-account.":"Bezig met verifiëren van de herstellinkâ¦"}),e.jsxs("label",{style:f,children:["Nieuw wachtwoord",e.jsx("input",{type:"password",required:!0,minLength:8,value:s,onChange:t=>w(t.target.value),style:b,autoComplete:"new-password",disabled:!n})]}),e.jsxs("label",{style:f,children:["Bevestig wachtwoord",e.jsx("input",{type:"password",required:!0,minLength:8,value:l,onChange:t=>x(t.target.value),style:b,autoComplete:"new-password",disabled:!n})]}),c&&e.jsx("div",{style:{marginTop:12,padding:"10px 12px",background:"#fde8e8",color:"#9b1c1c",fontSize:13,borderRadius:4},children:c}),p&&e.jsx("div",{style:{marginTop:12,padding:"10px 12px",background:"#d1fadf",color:"#054f31",fontSize:13,borderRadius:4},children:p}),e.jsx("button",{type:"submit",disabled:a||!n,style:{marginTop:20,width:"100%",padding:"12px 16px",background:"#1a1a18",color:"#f6f4f0",border:"none",borderRadius:4,fontSize:14,fontWeight:600,cursor:a||!n?"wait":"pointer",opacity:n?1:.6},children:a?"Bezigâ¦":"Wachtwoord opslaan"})]})})}const f={display:"block",marginTop:18,fontSize:13,fontWeight:600,color:"#1a1a18"},b={display:"block",width:"100%",marginTop:6,padding:"10px 12px",border:"1px solid #d4d0c8",borderRadius:4,fontSize:14,fontFamily:"inherit",background:"white",boxSizing:"border-box"};export{k as component};
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.