<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
    <loc>{{ route('index') }}</loc>
    <changefreq>daily</changefreq>
    <priority>1</priority>
</url>
@if($pages)
    @foreach($pages as $page)
<url>
    <loc>{{ route('site.page', [$page->slug]) }}</loc>
    <changefreq>{{ $settings->page_change_frequency }}</changefreq>
    <priority>{{ $settings->page_priority_level }}</priority>
</url>
    @endforeach
@endif

@if($countries)
        <url>
            <loc>{{ route('site.country') }}</loc>
            <changefreq>{{ $settings->country_change_frequency }}</changefreq>
            <priority>{{ $settings->country_priority_level }}</priority>
        </url>
    @foreach($countries as $country)
        <url>
            <loc>{{ route('site.country-websites', [$country->slug]) }}</loc>
            <changefreq>{{ $settings->country_change_frequency }}</changefreq>
            <priority>{{ $settings->country_priority_level }}</priority>
        </url>
    @endforeach
@endif

<url>
    <loc>{{ route('site.contact') }}</loc>
    <changefreq>daily</changefreq>
    <priority>1</priority>
</url>
</urlset>