<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  @foreach($staticPages as $page)
  <url>
    <loc>{{ $domain }}{{ $page['loc'] }}</loc>
    <priority>{{ $page['priority'] }}</priority>
    <changefreq>{{ $page['changefreq'] }}</changefreq>
    <lastmod>{{ now()->toAtomString() }}</lastmod>
  </url>
  @endforeach

  @foreach($genres as $genre)
  <url>
    <loc>{{ $domain }}/genre/{{ $genre->slug }}</loc>
    <priority>0.7</priority>
    <changefreq>weekly</changefreq>
    <lastmod>{{ $genre->updated_at?->toAtomString() ?? now()->toAtomString() }}</lastmod>
  </url>
  @endforeach

</urlset>
