<?php $__env->startSection('page_title', 'Edit ' . ucfirst($page_slug) . ' Page Content'); ?>

<?php $__env->startSection('content'); ?>
<section class="section">
    <div class="container">
        <div style="max-width: 800px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
            <form action="<?php echo e(route('admin.page-content.update', $page_slug)); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>
                
                <?php $__currentLoopData = $contents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $content): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div style="margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid #eee;">
                        <input type="hidden" name="contents[<?php echo e($index); ?>][id]" value="<?php echo e($content->id); ?>">
                        
                        <div style="margin-bottom: 20px;">
                            <label style="display: block; margin-bottom: 8px; font-weight: 700;">Section: <?php echo e(ucfirst($content->section_name)); ?> - Title</label>
                            <input type="text" name="contents[<?php echo e($index); ?>][title]" value="<?php echo e($content->title); ?>" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px;">
                        </div>

                        <div style="margin-bottom: 20px;">
                            <label style="display: block; margin-bottom: 8px; font-weight: 700;">Content Body</label>
                            <textarea name="contents[<?php echo e($index); ?>][body]" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; min-height: 150px;"><?php echo e($content->body); ?></textarea>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                <div style="text-align: center;">
                    <button type="submit" class="button button-primary" style="width: 100%;">Update <?php echo e(ucfirst($page_slug)); ?> Content</button>
                    <a href="<?php echo e(route($page_slug)); ?>" style="display: block; margin-top: 15px; color: #666; text-decoration: none;">Cancel and Go Back</a>
                </div>
            </form>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\Touchfoundation\resources\views/pages/admin/page-content.blade.php ENDPATH**/ ?>