
import { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  const baseUrl = process.env.NEXTAUTH_URL || 'https://quote2contract-crm-7yqnrl.abacusai.app';
  
  return {
    rules: [
      {
        userAgent: '*',
        allow: ['/', '/landing', '/get-quote', '/south-africa', '/usa', '/united-kingdom', '/australia'],
        disallow: ['/api/', '/dashboard/', '/quotes/', '/leads/', '/contracts/', '/calendar/', '/cockpit/', '/analytics/'],
      },
    ],
    sitemap: `${baseUrl}/sitemap.xml`,
  };
}
