export default defineEventHandler(async (event) => {
  const sessionManager = createSessionManager();
  const cookieHeader = getHeader(event, 'cookie');
  
  console.log('🚪 Logout requested');
  
  // Clear the session from server-side store
  const destroyCookie = sessionManager.destroySession(cookieHeader);
  
  setHeader(event, 'Set-Cookie', destroyCookie);
  
  console.log('✅ Logout successful');
  
  return { success: true };
});
