import { NextResponse } from 'next/server';

export const runtime = 'edge';

export async function GET() {
  const envVars = {
    NEXT_PUBLIC_APPWRITE_ENDPOINT: process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT,
    NEXT_PUBLIC_APPWRITE_PROJECT_ID: process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID,
    NEXT_PUBLIC_APPWRITE_DATABASE_ID: process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID,
    NEXT_PUBLIC_APPWRITE_COLLECTION_PRODUTOS_CATALOGO_ID: process.env.NEXT_PUBLIC_APPWRITE_COLLECTION_PRODUTOS_CATALOGO_ID,
    APPWRITE_API_KEY: process.env.APPWRITE_API_KEY ? '***DEFINED***' : 'UNDEFINED'
  };

  return NextResponse.json({
    message: 'Environment Variables Debug',
    variables: envVars
  });
}