import blogs from '@/data/blogs.json';

const BASE_URL = 'https://trainsofrajbari.com';

export default function sitemap() {
  const blogEntries = blogs.map((blog) => ({
    url: `${BASE_URL}/blog/${blog.slug}`,
    lastModified: new Date(blog.date),
    changeFrequency: 'monthly',
    priority: 0.6,
  }));

  return [
    {
      url: `${BASE_URL}/`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 1.0,
    },
    {
      url: `${BASE_URL}/schedules`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.9,
    },
    {
      url: `${BASE_URL}/about`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'monthly',
      priority: 0.8,
    },
    {
      url: `${BASE_URL}/blogs`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.8,
    },
    // HIGH VALUE SEO ROUTE PAGES
    {
      url: `${BASE_URL}/dhaka-to-rajbari`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/rajbari-to-dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/dhaka-to-pangsha`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.85,
    },
    {
      url: `${BASE_URL}/pangsha-to-dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.85,
    },
    {
      url: `${BASE_URL}/dhaka-to-kalukhali`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.85,
    },
    {
      url: `${BASE_URL}/kalukhali-to-dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.85,
    },
    {
      url: `${BASE_URL}/dhaka-to-khulna`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/khulna-to-dhaka`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/dhaka-to-rajshahi`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/rajshahi-to-dhaka`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.95,
    },
    {
      url: `${BASE_URL}/dhaka-to-jashore`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.90,
    },
    {
      url: `${BASE_URL}/jashore-to-dhaka`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.90,
    },
    {
      url: `${BASE_URL}/dhaka-to-kushtia`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.90,
    },
    {
      url: `${BASE_URL}/kushtia-to-dhaka`,
      lastModified: new Date('2026-05-03'),
      changeFrequency: 'daily',
      priority: 0.90,
    },
    // Station-specific Schedule Pages
    {
      url: `${BASE_URL}/schedules?station=dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.8,
    },
    {
      url: `${BASE_URL}/schedules?station=rajbari`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.8,
    },
    {
      url: `${BASE_URL}/schedules?station=pachuria`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=goalondo_bazar`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=goalondo_ghat`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=surjanagar`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=belgachi`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=kalukhali`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=pangsha`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    // Station-to-Station Routes
    {
      url: `${BASE_URL}/schedules?station=dhaka&to=rajbari`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.75,
    },
    {
      url: `${BASE_URL}/schedules?station=rajbari&to=dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.75,
    },
    {
      url: `${BASE_URL}/schedules?station=dhaka&to=pangsha`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=pangsha&to=dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=dhaka&to=kalukhali`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    {
      url: `${BASE_URL}/schedules?station=kalukhali&to=dhaka`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'daily',
      priority: 0.7,
    },
    // Station Gallery Pages
    {
      url: `${BASE_URL}/station/rajbari`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.6,
    },
    {
      url: `${BASE_URL}/station/pangsha`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.6,
    },
    {
      url: `${BASE_URL}/station/kalukhali`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.6,
    },
    {
      url: `${BASE_URL}/station/pachuria`,
      lastModified: new Date('2026-02-11'),
      changeFrequency: 'weekly',
      priority: 0.6,
    },
    ...blogEntries,
  ];
}
