import { MetadataRoute } from 'next'
import { i18n } from './dictionaries'

export default function sitemap(): MetadataRoute.Sitemap {
  const baseUrl = 'https://moygroup.com.tr'
  
  // Public pages defined in the project
  const pages = ['', '/kurumsal', '/galeri', '/iletisim', '/menu', '/sss']
  
  const sitemapEntries: MetadataRoute.Sitemap = []
  
  for (const locale of i18n.locales) {
    for (const page of pages) {
      sitemapEntries.push({
        url: `${baseUrl}/${locale}${page}`,
        lastModified: new Date(),
        changeFrequency: page === '' ? 'weekly' : 'monthly',
        priority: page === '' ? 1 : 0.8,
      })
    }
  }

  return sitemapEntries
}
