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

  @foreach($animes as $anime)
  <url>
    <loc>{{ $domain }}/anime/{{ $anime->slug }}</loc>
    <video:video>
      <video:thumbnail_loc>{{ $anime->cover_image_url ?? $domain . '/logo.jpg' }}</video:thumbnail_loc>
      <video:title>{{ htmlspecialchars($anime->title . ' İzle - Türkçe Altyazılı') }}</video:title>
      <video:description>{{ htmlspecialchars(\Illuminate\Support\Str::limit(strip_tags($anime->description ?? $anime->title . ' Türkçe altyazılı ücretsiz izle — Animexe'), 200)) }}</video:description>
      <video:player_loc>{{ $anime->first_ep_watch_url }}</video:player_loc>
      @foreach($anime->episodes->take(3) as $ep)
      @php $sNum = optional($ep->season)->season_number ?? 1; @endphp
      <video:tag>{{ htmlspecialchars($anime->title . ' ' . $ep->episode_number . '. Bölüm İzle') }}</video:tag>
      @endforeach
      <video:tag>anime izle</video:tag>
      <video:tag>türkçe anime</video:tag>
      <video:tag>{{ htmlspecialchars($anime->title) }} izle</video:tag>
      <video:family_friendly>yes</video:family_friendly>
      <video:requires_subscription>no</video:requires_subscription>
      <video:live>no</video:live>
    </video:video>
  </url>
  @endforeach

</urlset>
