/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  async rewrites() {
    return [
      {
        source: '/socket.io/:path*',
        destination: 'http://whatsapp-gateway.ai-agents.svc.cluster.local:5001/socket.io/:path*'
      },
      {
        source: '/proxy/whatsapp/:path*',
        destination: 'http://whatsapp-gateway.ai-agents.svc.cluster.local:5001/:path*'
      },
      {
        source: '/proxy/gmail/:path*',
        destination: 'http://gmail-agent.ai-agents.svc.cluster.local:5002/:path*'
      },
      {
        source: '/proxy/utility/:path*',
        destination: 'http://utility-agent.ai-agents.svc.cluster.local:5005/:path*'
      }
    ];
  }
};

export default nextConfig;
