<?php $__env->startSection('title', 'All About'); ?>
<?php $__env->startSection('content'); ?>
    <div class="container">
        <h2 class="mt-4 text-center">Banners Management</h2>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">Blog Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.blog.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($blogBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'blog')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($blogBanner) && $blogBanner->getFirstMediaUrl('banner') ? $blogBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">


                    </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
        <hr>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">Shop Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.shop.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($shopBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'shop')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($shopBanner) && $shopBanner->getFirstMediaUrl('banner') ? $shopBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">
                    </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
        <hr>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">Product Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.product.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($productBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'product')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($productBanner) && $productBanner->getFirstMediaUrl('banner') ? $productBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">
                    </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
        <hr>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">About Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.about.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($aboutBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'about')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($aboutBanner) && $aboutBanner->getFirstMediaUrl('banner') ? $aboutBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">
                    </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
        <hr>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">Contact Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.contact.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($contactBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'contact')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($contactBanner) && $contactBanner->getFirstMediaUrl('banner') ? $contactBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">                    </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
        <hr>

        
        <div class="card mt-4">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">Wholesale Banner</h4>
            </div>
            <div class="card-body">
                <form action="<?php echo e(route('admin.wholesale.banners.store')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="heading">Heading</label>
                        <input type="text" name="heading" class="form-control" value="<?php echo e($wholesaleBanner->heading ?? ''); ?>" placeholder="Enter Heading" required>
                    </div>
                    <div class="form-group">
                        <label for="image">Banner Image</label>
                        <input type="file" name="image" class="form-control" accept="image/*" onchange="previewImage(event, 'wholesale')">
                    </div>
                    <div class="form-group">
                        <img id="blog_preview"
                             src="<?php echo e(isset($wholesaleBanner) && $wholesaleBanner->getFirstMediaUrl('banner') ? $wholesaleBanner->getFirstMediaUrl('banner') : asset('front/images/innerbnr1.png')); ?>"
                             alt="Image Preview"
                             style="width: 50%; height: 50%; margin-top: 10px;">                      </div>
                    <button type="submit" class="btn btn-success">Submit</button>
                </form>
            </div>
        </div>
    </div>






    <script>
        function previewImage(event, page) {
            const preview = document.getElementById(page + '_preview');
            const file = event.target.files[0];
            const reader = new FileReader();

            reader.onload = function () {
                preview.src = reader.result;
                preview.style.display = 'block';
            };

            if (file) {
                reader.readAsDataURL(file);
            } else {
                preview.src = '#';
                preview.style.display = 'none';
            }
        }
    </script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/vagrant/projects/upsence/resources/views/admin/pages/pages-banner.blade.php ENDPATH**/ ?>