import { NextResponse } from "next/server";
import { withCorrelationId } from "@/lib/correlation-id";

const COOKIE_NAME = "agnet_token";

export async function POST() {
  const correlationId = crypto.randomUUID();
  const response = NextResponse.json({ success: true });
  response.cookies.set(COOKIE_NAME, "", {
    httpOnly: true,
    secure: process.env.NODE_ENV === "production",
    sameSite: "lax",
    path: "/",
    maxAge: 0,
  });
  return withCorrelationId(response, correlationId);
}
