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

    {{-- Ana Sayfa --}}
    <url>
        <loc>{{ url('/') }}</loc>
        <lastmod>{{ now()->format('Y-m-d') }}</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>

    {{-- Modül Liste Sayfaları --}}
    <url>
        <loc>{{ url('/modules/travel-point') }}</loc>
        <lastmod>{{ now()->format('Y-m-d') }}</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>

    <url>
        <loc>{{ url('/modules/activities') }}</loc>
        <lastmod>{{ now()->format('Y-m-d') }}</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>

    <url>
        <loc>{{ url('/modules/restaurant') }}</loc>
        <lastmod>{{ now()->format('Y-m-d') }}</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>

    <url>
        <loc>{{ url('/modules/shopping') }}</loc>
        <lastmod>{{ now()->format('Y-m-d') }}</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>

    {{-- Travel Points Detay Sayfaları --}}
    @foreach ($travelPoints as $travelPoint)
        <url>
            <loc>{{ url('/travel-point/' . $travelPoint->slug) }}</loc>
            <lastmod>{{ $travelPoint->updated_at ? $travelPoint->updated_at->format('Y-m-d') : now()->format('Y-m-d') }}</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.7</priority>
        </url>
    @endforeach

    {{-- Activities Detay Sayfaları --}}
    @foreach ($activities as $activity)
        <url>
            <loc>{{ url('/activity/' . $activity->slug) }}</loc>
            <lastmod>{{ $activity->updated_at ? $activity->updated_at->format('Y-m-d') : now()->format('Y-m-d') }}</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.7</priority>
        </url>
    @endforeach

    {{-- Restaurants Detay Sayfaları --}}
    @foreach ($restaurants as $restaurant)
        <url>
            <loc>{{ url('/restaurant/' . $restaurant->slug) }}</loc>
            <lastmod>{{ $restaurant->updated_at ? $restaurant->updated_at->format('Y-m-d') : now()->format('Y-m-d') }}</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.7</priority>
        </url>
    @endforeach

    {{-- Shopping Detay Sayfaları --}}
    @foreach ($shoppings as $shopping)
        <url>
            <loc>{{ url('/shopping/' . $shopping->slug) }}</loc>
            <lastmod>{{ $shopping->updated_at ? $shopping->updated_at->format('Y-m-d') : now()->format('Y-m-d') }}</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.7</priority>
        </url>
    @endforeach

</urlset>
