import { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3030'
  
  return {
    rules: {
      userAgent: '*',
      allow: '/',
      disallow: [
        '/api/',      // Disallow API routes (if any)
        '/_next/',    // Disallow Next.js internals
        '/admin/',    // Disallow admin (if any)
      ],
    },
    sitemap: `${baseUrl}/sitemap.xml`,
  }
}
