import type { MetadataRoute } from 'next';

const BASE = (process.env.NEXT_PUBLIC_APP_URL || 'https://tools.cambridgeveritas.com').replace(/\/$/, '');

export default function robots(): MetadataRoute.Robots {
  return {
    rules: {
      userAgent: '*',
      allow: '/',
      disallow: [
        '/tools/',
        '/account/',
        '/dashboard/',
        '/api/',
        '/*-thanks-you',
        '/*-thank-you',
      ],
    },
    sitemap: `${BASE}/sitemap.xml`,
  };
}
