{% extends 'admin/base.html.twig' %}

{% block title %}SEO Paneli{% endblock %}
{% block page_title %}SEO Paneli{% endblock %}

{% block body %}
    {# Stats Cards #}
    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
        <div class="card">
            <div class="card-body flex items-center gap-4">
                <div class="flex-shrink-0 w-12 h-12 rounded-lg bg-blue-50 flex items-center justify-center">
                    <i class="fas fa-newspaper text-blue-600 text-xl"></i>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Toplam Haber</p>
                    <p class="text-2xl font-bold text-gray-900">{{ totalNews }}</p>
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body flex items-center gap-4">
                <div class="flex-shrink-0 w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center">
                    <i class="fas fa-directions text-green-600 text-xl"></i>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Toplam Yonlendirme</p>
                    <p class="text-2xl font-bold text-gray-900">{{ redirectCount }}</p>
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body flex items-center gap-4">
                <div class="flex-shrink-0 w-12 h-12 rounded-lg bg-purple-50 flex items-center justify-center">
                    <i class="fas fa-check-circle text-purple-600 text-xl"></i>
                </div>
                <div>
                    <p class="text-sm text-gray-500">Aktif Yonlendirme</p>
                    <p class="text-2xl font-bold text-gray-900">{{ activeRedirectCount }}</p>
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body flex items-center gap-4">
                <div class="flex-shrink-0 w-12 h-12 rounded-lg bg-yellow-50 flex items-center justify-center">
                    <i class="fas fa-robot text-yellow-600 text-xl"></i>
                </div>
                <div>
                    <p class="text-sm text-gray-500">robots.txt</p>
                    <p class="text-lg font-bold text-green-600">Aktif</p>
                </div>
            </div>
        </div>
    </div>

    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
        {# Quick Actions #}
        <div class="card">
            <div class="card-header">
                <h3 class="card-title"><i class="fas fa-bolt mr-2 text-gray-500"></i> Hizli Islemler</h3>
            </div>
            <div class="card-body space-y-3">
                <a href="{{ path('admin_seo_redirects') }}"
                   class="flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors group">
                    <div class="flex-shrink-0 w-10 h-10 rounded-lg bg-primary-50 flex items-center justify-center group-hover:bg-primary-100">
                        <i class="fas fa-directions text-primary-600"></i>
                    </div>
                    <div class="flex-1">
                        <span class="font-medium text-gray-900">Yonlendirmeleri Yonet</span>
                        <p class="text-xs text-gray-500">301/302 yonlendirmelerini ekle, duzenle ve sil.</p>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </a>

                <a href="{{ path('admin_settings') }}"
                   class="flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors group">
                    <div class="flex-shrink-0 w-10 h-10 rounded-lg bg-green-50 flex items-center justify-center group-hover:bg-green-100">
                        <i class="fas fa-cog text-green-600"></i>
                    </div>
                    <div class="flex-1">
                        <span class="font-medium text-gray-900">SEO Ayarlari</span>
                        <p class="text-xs text-gray-500">Google Analytics, Tag Manager ve meta etiketleri.</p>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </a>

                <a href="{{ path('admin_theme') }}"
                   class="flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors group">
                    <div class="flex-shrink-0 w-10 h-10 rounded-lg bg-purple-50 flex items-center justify-center group-hover:bg-purple-100">
                        <i class="fas fa-palette text-purple-600"></i>
                    </div>
                    <div class="flex-1">
                        <span class="font-medium text-gray-900">Tema Ayarlari</span>
                        <p class="text-xs text-gray-500">Site gorunumu ve layout ayarlari.</p>
                    </div>
                    <i class="fas fa-chevron-right text-gray-400"></i>
                </a>
            </div>
        </div>

        {# SEO Checklist #}
        <div class="card">
            <div class="card-header">
                <h3 class="card-title"><i class="fas fa-clipboard-check mr-2 text-gray-500"></i> SEO Kontrol Listesi</h3>
            </div>
            <div class="card-body space-y-3">
                <div class="flex items-center gap-3 p-3 rounded-lg bg-green-50">
                    <i class="fas fa-check-circle text-green-500"></i>
                    <span class="text-sm text-green-800">robots.txt dosyasi mevcut</span>
                </div>
                <div class="flex items-center gap-3 p-3 rounded-lg bg-green-50">
                    <i class="fas fa-check-circle text-green-500"></i>
                    <span class="text-sm text-green-800">{{ redirectCount }} yonlendirme tanimli</span>
                </div>
                <div class="flex items-center gap-3 p-3 rounded-lg bg-yellow-50">
                    <i class="fas fa-exclamation-circle text-yellow-500"></i>
                    <span class="text-sm text-yellow-800">SEO meta etiketlerini kontrol edin</span>
                </div>
                <div class="flex items-center gap-3 p-3 rounded-lg bg-blue-50">
                    <i class="fas fa-info-circle text-blue-500"></i>
                    <span class="text-sm text-blue-800">{{ totalNews }} haberin SEO kontrolu yapilabilir</span>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
