import { MetadataRoute } from 'next'

/**
 * Robots.txt pour BTP Xpress - Optimisation SEO
 */
export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: '*',
        allow: '/',
        disallow: [
          '/api/',
          '/dashboard/',
          '/chantiers/',
          '/clients/',
          '/devis/',
          '/factures/',
          '/planning/',
          '/materiels/',
          '/stock/',
          '/rapports/',
          '/admin/',
          '/profile/',
          '/auth/',
          '/_next/',
          '/private/',
        ],
      },
      {
        userAgent: 'Googlebot',
        allow: '/',
        disallow: [
          '/api/',
          '/dashboard/',
          '/chantiers/',
          '/clients/',
          '/devis/',
          '/factures/',
          '/planning/',
          '/materiels/',
          '/stock/',
          '/rapports/',
          '/admin/',
          '/profile/',
          '/auth/',
          '/_next/',
          '/private/',
        ],
      },
    ],
    sitemap: 'https://btpxpress.lions.dev/sitemap.xml',
    host: 'https://btpxpress.lions.dev',
  }
}
