import { NextResponse } from "next/server";
import { googleOAuth, isProduction, smtp } from "@/lib/auth/config";

export const runtime = "nodejs";
export const dynamic = "force-dynamic";

/**
 * Tells the client which sign-in paths are actually wired up, so the UI never
 * offers a Google button that would dead-end on a missing client secret.
 * Booleans only — no credentials or hostnames leave the server.
 */
export async function GET() {
  return NextResponse.json({
    google: googleOAuth.isConfigured,
    smtp: smtp.isConfigured,
    /** Development without SMTP returns the confirmation link inline instead of mailing it. */
    devMailFallback: !smtp.isConfigured && !isProduction,
  });
}
