<?xml version="1.0" encoding="utf-8" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
                            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
                            http://www.google.com/schemas/sitemap-image/1.1 
                            http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd
                            http://www.w3.org/1999/xhtml
                            http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd">
    @foreach ($items as $item)
    <url>
        <loc>{{ $item['url'] }}</loc>
        <priority>{{ $priority }}</priority>
        <lastmod>{{ $lastmod }}</lastmod>
        <changefreq>{{ $changefreq }}</changefreq>
        @if (!empty($item['image_url']))
        <image:image>
            <image:loc>{{ getImageCdn($item['image_url'], 0, 0, true, false) }}</image:loc>
            <image:title>
            <![CDATA[ {{ $item['name'] }} ]]>
            </image:title>
            <image:caption>
            <![CDATA[ {{ $item['name'] }} ]]>
            </image:caption>
        </image:image>
        @endif
        @if(!empty($item['hreflangs']))
            @foreach ($item['hreflangs'] as $href)
                <xhtml:link rel="alternate" hreflang="{{ $href['lang'] }}" href="{{ $href['url'] }}" />
            @endforeach
        @endif
    </url>
    @endforeach
</urlset>