<section id="share" class="py-4" style="background-color: #F5F5F5;">
    <div class="container text-center">
        <h2 class="h6 text-muted mb-3">Bagikan Halaman Ini</h2>
        <div class="d-flex justify-content-center gap-2 flex-wrap">
            <a class="btn btn-success btn-sm" target="_blank"
               href="https://wa.me/?text={{ urlencode('Informasi Pilkades Desa '.$desa->nama.': '.$landingUrl) }}">
                WhatsApp
            </a>
            <a class="btn btn-primary btn-sm" target="_blank"
               href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode($landingUrl) }}">
                Facebook
            </a>
            <a class="btn btn-info btn-sm text-white" target="_blank"
               href="https://t.me/share/url?url={{ urlencode($landingUrl) }}">
                Telegram
            </a>
            <a class="btn btn-dark btn-sm" target="_blank"
               href="https://twitter.com/intent/tweet?url={{ urlencode($landingUrl) }}">
                X
            </a>
            <button type="button" class="btn btn-outline-secondary btn-sm"
                    onclick="navigator.clipboard.writeText('{{ $landingUrl }}'); Swal.fire({icon:'success', title:'Link disalin', timer:1200, showConfirmButton:false})">
                Copy Link
            </button>
        </div>

        <div class="mt-3">
            <img src="{{ route('public.share.qr-code', [$desa->kecamatan->kabupaten->slug, $desa->kecamatan->slug, $desa->slug]) }}"
                 alt="QR Code {{ $desa->nama }}" style="width: 120px; height: 120px;">
        </div>
    </div>
</section>
