<?php $__env->startSection('title', 'Edit Slide'); ?>
<?php $__env->startSection('page-title', 'Edit Slide'); ?>

<?php $__env->startSection('content'); ?>
<div class="bg-white rounded-xl shadow-lg border border-gray-100 p-4 md:p-8">
    <div class="mb-4 md:mb-6 pb-4 border-b border-gray-200">
        <h3 class="text-xl md:text-2xl font-bold text-gray-800">Edit Slide</h3>
        <p class="text-gray-500 text-xs md:text-sm mt-1">Update the slide information below</p>
    </div>
    
    <form method="POST" action="<?php echo e(route('admin.slides.update', $slide)); ?>" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>

        <?php echo $__env->make('admin.slides._form', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    </form>
</div>

<script>
function previewImage(input, previewId) {
    if (input.files && input.files[0]) {
        const reader = new FileReader();
        reader.onload = function(e) {
            document.getElementById(previewId).src = e.target.result;
            document.getElementById('image_preview_container').classList.remove('hidden');
            document.getElementById('image_url').value = '';
        };
        reader.readAsDataURL(input.files[0]);
    }
}

function previewImageUrl(input, previewId) {
    if (input.value) {
        document.getElementById(previewId).src = input.value;
        document.getElementById('image_preview_container').classList.remove('hidden');
        document.getElementById('image_upload').value = '';
    }
}

function clearImagePreview(previewId, uploadId) {
    document.getElementById(previewId).src = '';
    document.getElementById('image_preview_container').classList.add('hidden');
    document.getElementById(uploadId).value = '';
    document.getElementById('image_url').value = '';
}
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/slides/edit.blade.php ENDPATH**/ ?>