import { cookies } from "next/headers"
import { NextResponse } from "next/server"

const SESSION_COOKIES = [
  "ulti_session",
  "ulti_access_token",
  "ulti_refresh_token",
  "ulti_expires_at",
  "ulti_pkce_verifier",
  "ulti_oauth_state",
  "ulti_auth_return",
  "ulti_auth_intent",
  "ulti_auth_previous_sub",
] as const

export async function POST() {
  const response = NextResponse.json({ ok: true })
  for (const name of SESSION_COOKIES) {
    response.cookies.delete(name)
  }
  return response
}
