export default defineEventHandler(async (event) => {
  try {
    return {
      status: 'healthy',
      timestamp: new Date().toISOString(),
      uptime: process.uptime(),
      environment: process.env.NODE_ENV || 'development',
      oidc: {
        configured: !!process.env.NUXT_OIDC_TOKEN_KEY,
        hasClientSecret: !!process.env.NUXT_OIDC_PROVIDERS_KEYCLOAK_CLIENT_SECRET
      }
    }
  } catch (error) {
    throw createError({
      statusCode: 500,
      statusMessage: 'Health check failed',
      data: error instanceof Error ? error.message : 'Unknown error'
    })
  }
})
