export default async function VerifyEmailPage({
  searchParams,
}: {
  searchParams: Promise<{ status?: string }>;
}) {
  const { status } = await searchParams;

  const content: Record<string, { title: string; message: string }> = {
    success: {
      title: "Email Verified",
      message: "Your account is now active. You can log in now.",
    },
    already: {
      title: "Already Verified",
      message: "Your email is already verified. You can log in.",
    },
    expired: {
      title: "Link Expired",
      message:
        "This verification link has expired. Please contact support or register again.",
    },
    invalid: {
      title: "Invalid Link",
      message: "This verification link is invalid or has already been used.",
    },
  };

  const result = content[status || "invalid"];

  return (
    <main className="mainsection d-flex align-items-center justify-content-center">
      <div className="text-center p-4">
        <h2>{result.title}</h2>
        <p>{result.message}</p>
        <a href="/student/login" className="theme-btn">
          Go to Login
        </a>
      </div>
    </main>
  );
}