

<?php $__env->startSection('header-title', 'SEO Ayarları Düzenle'); ?>

<?php $__env->startSection('content'); ?>
<div class="page-title">
    <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 8px;">
        <a href="<?php echo e(route('admin.seo.index')); ?>" style="display: inline-flex; align-items: center; gap: 6px; color: var(--gray-500); text-decoration: none; font-size: 14px; transition: color 0.2s ease;">
            <svg style="width: 16px; height: 16px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
            </svg>
            SEO Ayarlarına Dön
        </a>
    </div>
    <h1>SEO Ayarları Düzenle</h1>
    <p><?php echo e($seo->page_type); ?> sayfası için meta etiket ve SEO ayarlarını düzenleyin</p>
</div>

<div class="info-card">
    <form method="POST" action="<?php echo e(route('admin.seo.update', $seo)); ?>">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 24px;">
            <!-- Meta Başlık -->
            <div>
                <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                    Meta Başlık
                    <span style="color: var(--danger);">*</span>
                </label>
                <input type="text"
                       name="meta_title"
                       value="<?php echo e(old('meta_title', $seo->meta_title)); ?>"
                       maxlength="60"
                       required
                       style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; transition: border-color 0.2s ease;"
                       oninput="document.getElementById('title-count').textContent = this.value.length">
                <div style="display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--gray-500);">
                    <span>Önerilen: 50–60 karakter</span>
                    <span id="title-count"><?php echo e(strlen($seo->meta_title)); ?>/60</span>
                </div>
                <?php $__errorArgs = ['meta_title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <!-- Robots -->
            <div>
                <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                    Robots Etiketi
                    <span style="color: var(--danger);">*</span>
                </label>
                <select name="robots"
                        required
                        style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; background: white;">
                    <option value="index" <?php echo e($seo->robots === 'index' ? 'selected' : ''); ?>>index, follow (İndexlenebilir)</option>
                    <option value="noindex" <?php echo e($seo->robots === 'noindex' ? 'selected' : ''); ?>>noindex, follow (İndexlenemez)</option>
                    <option value="nofollow" <?php echo e($seo->robots === 'nofollow' ? 'selected' : ''); ?>>index, nofollow (Link takip edilmez)</option>
                    <option value="noindex,nofollow" <?php echo e($seo->robots === 'noindex,nofollow' ? 'selected' : ''); ?>>noindex, nofollow (Hiçbiri)</option>
                </select>
                <?php $__errorArgs = ['robots'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>
        </div>

        <!-- Meta Açıklama -->
        <div style="margin-bottom: 24px;">
            <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                Meta Açıklama
                <span style="color: var(--danger);">*</span>
            </label>
            <textarea name="meta_description"
                      rows="3"
                      maxlength="160"
                      required
                      style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px; resize: vertical; font-family: inherit;"
                      oninput="document.getElementById('desc-count').textContent = this.value.length"><?php echo e(old('meta_description', $seo->meta_description)); ?></textarea>
            <div style="display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--gray-500);">
                <span>Önerilen: 150–160 karakter</span>
                <span id="desc-count"><?php echo e(strlen($seo->meta_description)); ?>/160</span>
            </div>
            <?php $__errorArgs = ['meta_description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <!-- Canonical URL -->
        <div style="margin-bottom: 24px;">
            <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                Canonical URL
            </label>
            <input type="url"
                   name="canonical_url"
                   value="<?php echo e(old('canonical_url', $seo->canonical_url)); ?>"
                   placeholder="https://askeriplatform.com/sayfa"
                   style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 14px;">
            <div style="font-size: 12px; color: var(--gray-500); margin-top: 4px;">Kopya içerik sorunlarını önlemek için kullanılır</div>
            <?php $__errorArgs = ['canonical_url'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <!-- Schema Markup -->
        <div style="margin-bottom: 24px;">
            <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                Schema Markup (JSON-LD)
            </label>
            <textarea name="schema_markup"
                      rows="6"
                      placeholder='{"@context": "https://schema.org", "@type": "WebSite", ...}'
                      style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 13px; resize: vertical; font-family: 'Consolas', 'Monaco', monospace;"><?php echo e(old('schema_markup', is_string($seo->schema_markup) ? $seo->schema_markup : json_encode($seo->schema_markup, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE))); ?></textarea>
            <div style="font-size: 12px; color: var(--gray-500); margin-top: 4px;">Arama sonuçlarında zengin snippet'ler için yapısal veri</div>
            <?php $__errorArgs = ['schema_markup'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <!-- OG Tags -->
        <div style="margin-bottom: 24px;">
            <label style="display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px;">
                Open Graph Etiketleri (JSON)
            </label>
            <textarea name="og_tags"
                      rows="5"
                      placeholder='{"og:title": "Başlık", "og:description": "Açıklama", "og:image": "https://..."}'
                      style="width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 13px; resize: vertical; font-family: 'Consolas', 'Monaco', monospace;"><?php echo e(old('og_tags', is_string($seo->og_tags) ? $seo->og_tags : json_encode($seo->og_tags, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE))); ?></textarea>
            <div style="font-size: 12px; color: var(--gray-500); margin-top: 4px;">Sosyal medya paylaşım görünürlüğü için</div>
            <?php $__errorArgs = ['og_tags'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div style="color: var(--danger); font-size: 12px; margin-top: 4px;"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <!-- Submit Buttons -->
        <div style="display: flex; gap: 12px; padding-top: 20px; border-top: 1px solid var(--gray-200);">
            <button type="submit"
                    style="padding: 12px 24px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; transition: all 0.2s ease;">
                Kaydet
            </button>
            <a href="<?php echo e(route('admin.seo.index')); ?>"
               style="padding: 12px 24px; background: var(--gray-100); color: var(--gray-700); border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 14px; transition: all 0.2s ease;">
                İptal
            </a>
        </div>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\admin\seo\edit.blade.php ENDPATH**/ ?>