import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://passenger.edrsc.com';

  return {
    rules: [
      {
        userAgent: '*',
        allow: [
          '/',
          '/about',
          '/contact',
          '/services',
          '/packages',
          '/packages/',
          '/help',
          '/guide',
        ],
        disallow: [
          '/booking/',
          '/login',
          '/register',
          '/forgot-password',
          '/reset-password',
          '/set-password',
          '/verify-account',
          '/fayda-setup',
          '/profile',
          '/go/',
          '/api/',
        ],
      },
    ],
    sitemap: `${baseUrl}/sitemap.xml`,
  };
}
