import { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  const baseUrl = process.env.NEXT_PUBLIC_APP_URL || 'https://store.amanenime.my.id'

  return {
    rules: {
      userAgent: '*',
      allow: '/',
      disallow: ['/admin/', '/dashboard/', '/api/'], // Jangan indeks halaman admin, user dashboard rahasia, dan API
    },
    sitemap: `${baseUrl}/sitemap.xml`,
  }
}
