import{o as d,r as n,j as e,L as l,A as x}from"./index-XAQEFxR0.js";const f=()=>{const{token:a}=d(),[s,t]=n.useState("verifying"),[o,r]=n.useState("");return n.useEffect(()=>{(async()=>{try{const i=await fetch(`${x}/api/auth/verify-email/${a}`),c=await i.json();i.ok?(t("success"),r(c.message)):(t("error"),r(c.message||"Verification failed"))}catch{t("error"),r("An error occurred during verification")}})()},[a]),e.jsx("div",{className:"min-h-screen bg-infosec-bg flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-md w-full bg-[#1a1b1e] border border-gray-800 rounded-2xl p-8 text-center shadow-2xl",children:[s==="verifying"&&e.jsxs("div",{children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-infosec-accent mx-auto mb-4"}),e.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Verifying Email..."}),e.jsx("p",{className:"text-gray-400",children:"Please wait while we verify your email address."})]}),s==="success"&&e.jsxs("div",{children:[e.jsx("div",{className:"w-16 h-16 bg-green-500/10 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{className:"w-8 h-8 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),e.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Email Verified!"}),e.jsx("p",{className:"text-gray-400 mb-6",children:o}),e.jsx(l,{to:"/login",className:"inline-block px-6 py-3 bg-infosec-accent hover:bg-infosec-accentHover text-white font-bold rounded-xl transition",children:"Proceed to Login"})]}),s==="error"&&e.jsxs("div",{children:[e.jsx("div",{className:"w-16 h-16 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{className:"w-8 h-8 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Verification Failed"}),e.jsx("p",{className:"text-gray-400 mb-6",children:o}),e.jsx(l,{to:"/login",className:"text-infosec-accent hover:text-white transition",children:"Back to Login"})]})]})})};export{f as default};
