import { SESSION_COOKIE } from "@/lib/auth"

export async function POST() {
  try {
    return new Response(JSON.stringify({ success: true }), {
      status: 200,
      headers: {
        "Content-Type": "application/json",
        "Set-Cookie": `${SESSION_COOKIE}=; HttpOnly; SameSite=Strict; Path=/; Max-Age=0`,
      },
    })
  } catch (error) {
    console.error("Logout error:", error)
    return new Response(
      JSON.stringify({ error: "Logout failed." }),
      { status: 500, headers: { "Content-Type": "application/json" } }
    )
  }
}
