<?php $__env->startSection('title', 'Edit Blog Article'); ?>

<?php $__env->startPush('styles'); ?>
<script src="https://cdn.tiny.cloud/1/<?php echo e(config('services.tinymce.api_key', 'no-api-key')); ?>/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="mb-6">
    <h2 class="text-xl font-bold text-gray-800">Edit Blog Article</h2>
    <p class="text-sm text-gray-500 mt-1">Review, approve, reject, or fine-tune article metadata before publishing.</p>
</div>

<div class="mb-6 bg-white rounded-xl border border-gray-100 p-4 flex flex-wrap gap-3">
    <a href="<?php echo e(route('admin.blog-articles.preview', $blogArticle)); ?>" target="_blank" class="px-4 py-2.5 rounded-lg bg-gray-900 text-white text-sm font-semibold">Live Preview</a>
    <?php if($blogArticle->status !== 'approved'): ?>
        <form method="POST" action="<?php echo e(route('admin.blog-articles.approve', $blogArticle)); ?>">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PATCH'); ?>
            <button type="submit" class="px-4 py-2.5 rounded-lg bg-green-600 text-white text-sm font-semibold">Approve & Publish</button>
        </form>
    <?php endif; ?>
    <?php if($blogArticle->status !== 'rejected'): ?>
        <button type="button" data-reject-action="<?php echo e(route('admin.blog-articles.reject', $blogArticle)); ?>" class="px-4 py-2.5 rounded-lg bg-yellow-100 text-yellow-800 text-sm font-semibold">Reject With Feedback</button>
    <?php endif; ?>
</div>

<?php echo $__env->make('admin.blog-articles._form', [
    'action' => route('admin.blog-articles.update', $blogArticle),
    'method' => 'PUT',
    'blogArticle' => $blogArticle,
    'categories' => $categories,
], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<?php echo $__env->make('admin.blog-articles._reject_modal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<?php echo $__env->make('admin.blog-articles._tinymce', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/gpsmigration/public_html/gpsmigration.com/resources/views/admin/blog-articles/edit.blade.php ENDPATH**/ ?>