---
import BaseLayout from '../layouts/BaseLayout.astro';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';

const siteUrl = import.meta.env.SITE_URL || 'http://localhost:4321';

const pages = [
  { url: '/', priority: '1.0' },
  { url: '/privacy', priority: '0.8' },
  { url: '/terms', priority: '0.8' },
  { url: '/support', priority: '0.8' },
  { url: '/waitlist', priority: '0.9' },
  { url: '/changelog', priority: '0.6' },
  { url: '/download', priority: '0.7' },
];

const today = new Date().toISOString().split('T')[0];
---
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  {pages.map(page => (
    <url>
      <loc>{siteUrl}{page.url}</loc>
      <lastmod>{today}</lastmod>
      <changefreq>weekly</changefreq>
      <priority>{page.priority}</priority>
    </url>
  ))}
</urlset>