<?php $__env->startSection('title', $title); ?>
<?php $__env->startSection('ad_page_title', 'Edit Privacy Policy'); ?>
<?php $__env->startSection('ad_page_subtitle', 'Legal copy (EN/AR) + SEO'); ?>

<?php $__env->startSection('ad_content'); ?>
    <?php
        $contentEn = $contentEn ?? [];
        $contentAr = $contentAr ?? [];
    ?>

    <div class="container-fluid py-4">
        <div class="d-flex flex-column flex-md-row justify-content-between align-items-start gap-3 mb-4">
            <div>
                <h1 class="h3 mb-1">Privacy Policy</h1>
                <p class="text-muted mb-0">Hero, sections, cross-link band, and meta tags.</p>
            </div>
            <div class="d-flex flex-wrap gap-2">
                <a href="<?php echo e(route('privacy.policy')); ?>" target="_blank" rel="noopener" class="btn btn-outline-primary btn-sm">
                    <i class="fa-solid fa-arrow-up-right-from-square me-1"></i> View live (EN)
                </a>
                <a href="<?php echo e(route('ar.privacy.policy')); ?>" target="_blank" rel="noopener" class="btn btn-outline-secondary btn-sm">
                    <i class="fa-solid fa-arrow-up-right-from-square me-1"></i> View live (AR)
                </a>
            </div>
        </div>

        <?php if(session('success')): ?>
            <div class="alert alert-success" role="alert"><?php echo e(session('success')); ?></div>
        <?php endif; ?>

        <?php if($errors->any()): ?>
            <div class="alert alert-danger" role="alert">
                <ul class="mb-0">
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><?php echo e($error); ?></li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        <?php endif; ?>

        <form action="<?php echo e(route('admin.pages.privacy-policy.update')); ?>" method="POST">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <div class="card shadow-sm border-0">
                <div class="card-body p-4">
                    <ul class="nav nav-tabs mb-4" role="tablist">
                        <li class="nav-item" role="presentation">
                            <button class="nav-link active" type="button" data-bs-toggle="tab" data-bs-target="#tab-privacy-en" role="tab">English</button>
                        </li>
                        <li class="nav-item" role="presentation">
                            <button class="nav-link" type="button" data-bs-toggle="tab" data-bs-target="#tab-privacy-ar" role="tab" dir="rtl">Arabic</button>
                        </li>
                    </ul>

                    <div class="tab-content">
                        <div class="tab-pane fade show active" id="tab-privacy-en" role="tabpanel">
                            <?php echo $__env->make('admin.pages._legal-page-lang-fields', ['prefix' => 'en', 'c' => $contentEn], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                        <div class="tab-pane fade" id="tab-privacy-ar" role="tabpanel">
                            <?php echo $__env->make('admin.pages._legal-page-lang-fields', ['prefix' => 'ar', 'c' => $contentAr], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        </div>
                    </div>

                    <hr class="my-4">
                    <?php echo $__env->make('admin.pages._seo-fields', ['seo' => $seo], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

                    <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mt-4">
                        <a href="<?php echo e(route('admin.pages.page-contents.edit', ['pageKey' => 'privacy_policy'])); ?>" class="btn btn-link btn-sm text-muted px-0">
                            Advanced: edit raw JSON
                        </a>
                        <div class="d-flex gap-2">
                            <a href="<?php echo e(route('admin.dashboard')); ?>" class="btn btn-light border">Cancel</a>
                            <button type="submit" class="btn btn-primary px-4">Save changes</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.ad_master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/onesourceerp/public_html/project/resources/views/admin/pages/privacy-policy/edit.blade.php ENDPATH**/ ?>