<?php $__env->startSection('title', 'Add Home Details'); ?>
<?php $__env->startSection('section'); ?>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.css"/>
    <link rel="stylesheet" href="<?php echo e(asset('admin/dropzone/dist/basic.css')); ?>">
    <style>
        .switch {
            position: relative;
            display: block;
            width: 60px;
            height: 34px;
        }
        img {
            object-fit: contain !important;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition: .4s;
            transition: .4s;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            -webkit-transition: .4s;
            transition: .4s;
        }

        input:checked + .slider {
            background-color: #2196F3;
        }

        input:focus + .slider {
            box-shadow: 0 0 1px #2196F3;
        }

        input:checked + .slider:before {
            -webkit-transform: translateX(26px);
            -ms-transform: translateX(26px);
            transform: translateX(26px);
        }

        /* Rounded sliders */
        .slider.round {
            border-radius: 34px;
        }

        .slider.round:before {
            border-radius: 50%;
        }

        .help-block {
            color: red;
        }

        .has-error {
            border-block-color: red;
        }
    </style>
    <?php
        if (!empty($home->content)) {
            // Decode the 'content' JSON string into an associative array.
            $decodedData = json_decode($home->content, true);
        }
    ?>
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>Home Form</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">Home</a></li>
                            <li class="breadcrumb-item active">Home Form</li>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>
        <!-- /.content-header -->

        <section class="content">
            <div class="container-fluid">
                

                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12">
                        <form class="category-form" method="post" action="<?php echo e(route('admin.home')); ?>"
                              enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <!-- general form elements -->
                            <div class="card card-primary">
                                <div class="card-body">
                                    <div class="tab-content ">
                                        <div class="tab-pane active" role="tabpanel" id="product">
                                            <div class="row">
                                                <div class="col">
                                                    <label for="">Meta Title</label>
                                                    <input type="text" name="meta_title" placeholder="Meta Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $home->meta_title : ''); ?>">
                                                </div>
                                                <div class="col">
                                                    <label for="">Meta Description</label>
                                                    <textarea name="meta_description" rows="4"
                                                              placeholder="Meta Description"
                                                              class="form-control"><?php echo e(!empty($home) ? $home->meta_description : ''); ?></textarea>
                                                </div>
                                            </div>
                                            <br>
                                            <h1>Slider Section</h1>
                                            <br>
                                            <h3>Slider Swap First</h3>
                                            <div class="col-md-9">
                                                <label for="slider_video">Slider Banner Image</label><br>
                                                <div class="col">
                                                    <img id="preview-image-before-upload1"
                                                         src="<?php echo e(!empty($home) && isset($decodedData['banner_image1']) ? asset('/upload/cms_images/'.$decodedData['banner_image1']) : ''); ?>"
                                                         alt="preview image" style="height: 200px; width: 65%">
                                                    <input type="file" id="image1" name="banner_image1"
                                                           class="form-control image-input"
                                                           data-field-name="banner_image1">

                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <input type="text" name="greeting1" placeholder="Greeting"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['greeting1'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title1" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title1'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title1_1" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title2'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="text" name="slider_sub_title1" placeholder="Sub Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_sub_title1'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload2"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon1_1']) ? asset('/upload/cms_images/'.$decodedData['fav_icon1_1']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image2" name="fav_icon1_1"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon1_1">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload3"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon1_2']) ? asset('/upload/cms_images/'.$decodedData['fav_icon1_2']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image3" name="fav_icon1_2"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon1_2">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload4"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon1_3']) ? asset('/upload/cms_images/'.$decodedData['fav_icon1_3']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image4" name="fav_icon1_3"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon1_3">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <br><br>


                                            <h3>Slider Swap Second</h3>
                                            <div class="col-md-9">
                                                <label for="slider_video">Slider Banner Image</label><br>
                                                <div class="col">
                                                    <img id="preview-image-before-upload5"
                                                         src="<?php echo e(!empty($home) && isset($decodedData['banner_image2']) ? asset('/upload/cms_images/'.$decodedData['banner_image2']) : ''); ?>"
                                                         alt="preview image" style="height: 200px; width: 65%">
                                                    <input type="file" name="banner_image2"
                                                           class="form-control  image-input" id="image5"
                                                           data-field-name="banner_image2">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <input type="text" name="greeting2" placeholder="Greeting"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['greeting2'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title2" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title2'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title2_2" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title2_2'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="text" name="slider_sub_title2" placeholder="Sub Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_sub_title2'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload6"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon2_1']) ? asset('/upload/cms_images/'.$decodedData['fav_icon2_1']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image6" name="fav_icon2_1"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon2_1">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload7"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon2_2']) ? asset('/upload/cms_images/'.$decodedData['fav_icon2_2']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image7" name="fav_icon2_2"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon2_2">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload8"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon2_3']) ? asset('/upload/cms_images/'.$decodedData['fav_icon2_3']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image8" name="fav_icon2_3"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon2_3">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <br><br>


                                            <h3>Slider Swap Third</h3>
                                            <div class="col-md-9">
                                                <label for="slider_video">Slider Banner Image</label><br>
                                                <div class="col">
                                                    <img id="preview-image-before-upload9"
                                                         src="<?php echo e(!empty($home) && isset($decodedData['banner_image3']) ? asset('/upload/cms_images/'.$decodedData['banner_image3']) : ''); ?>"
                                                         alt="preview image" style="height: 200px; width: 65%">
                                                    <input type="file" name="banner_image3"
                                                           id="image9" class="form-control image-input"
                                                           data-field-name="banner_image3">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <input type="text" name="greeting3" placeholder="Greeting"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['greeting3'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title3" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title3'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title3_3" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title3_3'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="text" name="slider_sub_title3" placeholder="Sub Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_sub_title3'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload10"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon3_1']) ? asset('/upload/cms_images/'.$decodedData['fav_icon3_1']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image10" name="fav_icon3_1"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon3_1">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload11"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon3_2']) ? asset('/upload/cms_images/'.$decodedData['fav_icon3_2']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image11" name="fav_icon3_2"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon3_2">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload12"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon3_3']) ? asset('/upload/cms_images/'.$decodedData['fav_icon3_3']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image12" name="fav_icon3_3"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon3_3">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <br><br>


                                            <h3>Slider Swap Fourth</h3>
                                            <div class="col-md-9">
                                                <label for="slider_video">Slider Banner Image</label><br>
                                                <div class="col">
                                                    <img id="preview-image-before-upload13"
                                                         src="<?php echo e(!empty($home) && isset($decodedData['banner_image4']) ? asset('/upload/cms_images/'.$decodedData['banner_image4']) : ''); ?>"
                                                         alt="preview image" style="height: 200px; width: 65%">
                                                    <input type="file" name="banner_image4"
                                                           id="image13" class="form-control image-input"
                                                           data-field-name="banner_image4">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <input type="text" name="greeting4" placeholder="Greeting"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['greeting4'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title4" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title4'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title4_4" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title4_4'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="text" name="slider_sub_title4" placeholder="Sub Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_sub_title4'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload14"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon4_1']) ? asset('/upload/cms_images/'.$decodedData['fav_icon4_1']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image14" name="fav_icon4_1"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon4_1">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload15"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon4_2']) ? asset('/upload/cms_images/'.$decodedData['fav_icon4_2']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image15" name="fav_icon4_2"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon4_2">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload16"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon4_3']) ? asset('/upload/cms_images/'.$decodedData['fav_icon4_3']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image16" name="fav_icon4_3"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon4_3">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <br><br>

                                            <h3>Slider Swap Fifth</h3>
                                            <div class="col-md-9">
                                                <label for="slider_video">Slider Banner Image</label><br>
                                                <div class="col">
                                                    <img id="preview-image-before-upload17"
                                                         src="<?php echo e(!empty($home) && isset($decodedData['banner_image5']) ? asset('/upload/cms_images/'.$decodedData['banner_image5']) : ''); ?>"
                                                         alt="preview image" style="height: 200px; width: 65%">
                                                    <input type="file" name="banner_image5"
                                                           id="image17" class="form-control image-input"
                                                           data-field-name="banner_image5">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <input type="text" name="greeting5" placeholder="Greeting"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['greeting5'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title5" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title5'] : ''); ?>">
                                                </div>

                                                <div class="col-md-4">
                                                    <input type="text" name="slider_title5_5" placeholder="Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_title5_5'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <input type="text" name="slider_sub_title5" placeholder="Sub Title"
                                                           class="form-control"
                                                           value="<?php echo e(!empty($home) ? $decodedData['slider_sub_title5'] : ''); ?>">
                                                </div>
                                            </div>
                                            <br>
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload18"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon5_1']) ? asset('/upload/cms_images/'.$decodedData['fav_icon5_1']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image18" name="fav_icon5_1"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon5_1">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload19"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon5_2']) ? asset('/upload/cms_images/'.$decodedData['fav_icon5_2']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image19" name="fav_icon5_2"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon5_2">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for="name">Fav Icon</label>
                                                        <div class="input-group-btn">
                                                            <div class="image-upload">
                                                                <img id="preview-image-before-upload20"
                                                                     src="<?php echo e(!empty($home) && isset($decodedData['fav_icon5_3']) ? asset('/upload/cms_images/'.$decodedData['fav_icon5_3']) : ''); ?>"
                                                                     class="img-responsive" width="100px"
                                                                     height="100px">
                                                                <div class="file-btn mt-4">
                                                                    <input type="file" id="image20" name="fav_icon5_3"
                                                                           accept=".jpg,.png,.ico"
                                                                           class="form-control image-input"
                                                                           data-field-name="fav_icon5_3">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <br><br>










































                                        </div>
                                    </div>

                                </div>
                                <div class="card-footer text-right">
                                    <input type="submit" value="Submit" id="submit_btn" class="btn btn-primary">
                                    <a href="<?php echo e(route('homeAdmin')); ?>" class="btn btn-warning" id=""
                                       style="">Cancel</a>
                                </div>
                            </div>
                        </form>
                        <!-- /.card -->
                    </div>
                </div>
            </div>
        </section>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script src="<?php echo e(asset('admin/ckeditor/ckeditor.js')); ?>"></script>
    <script src="<?php echo e(asset('js/create-product.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/dropzone/dist/dropzone.js')); ?>"></script>
    <script type="text/javascript">
        $(document).ready(function (e) {
            //IMAGE CHNAGE
            $('#image1').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload1').attr('src', e.target.result);
                    $('#preview-image-before-upload1').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image2').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload2').attr('src', e.target.result);
                    $('#preview-image-before-upload2').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image3').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload3').attr('src', e.target.result);
                    $('#preview-image-before-upload3').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image4').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload4').attr('src', e.target.result);
                    $('#preview-image-before-upload4').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image5').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload5').attr('src', e.target.result);
                    $('#preview-image-before-upload5').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image6').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload6').attr('src', e.target.result);
                    $('#preview-image-before-upload6').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image7').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload7').attr('src', e.target.result);
                    $('#preview-image-before-upload7').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image8').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload8').attr('src', e.target.result);
                    $('#preview-image-before-upload8').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image9').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload9').attr('src', e.target.result);
                    $('#preview-image-before-upload9').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image10').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload10').attr('src', e.target.result);
                    $('#preview-image-before-upload10').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image11').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload11').attr('src', e.target.result);
                    $('#preview-image-before-upload11').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);
            });
            $('#image12').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload12').attr('src', e.target.result);
                    $('#preview-image-before-upload12').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image13').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload13').attr('src', e.target.result);
                    $('#preview-image-before-upload13').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image14').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload14').attr('src', e.target.result);
                    $('#preview-image-before-upload14').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image15').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload15').attr('src', e.target.result);
                    $('#preview-image-before-upload15').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image16').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload16').attr('src', e.target.result);
                    $('#preview-image-before-upload16').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image17').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload17').attr('src', e.target.result);
                    $('#preview-image-before-upload17').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image18').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload18').attr('src', e.target.result);
                    $('#preview-image-before-upload18').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image19').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload19').attr('src', e.target.result);
                    $('#preview-image-before-upload19').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image20').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload20').attr('src', e.target.result);
                    $('#preview-image-before-upload20').css({"width": "20%", "height": "150px"});
                }
                reader.readAsDataURL(this.files[0]);

            });
            $('#image21').change(function () {
                let reader = new FileReader();
                reader.onload = (e) => {
                    $('#preview-image-before-upload21').attr('src', e.target.result);
                    $('#preview-image-before-upload21').css({"width": "65%", "height": "200px"});
                }
                reader.readAsDataURL(this.files[0]);

            });


            // TEXTAREA ONE COUNT ON PAGE LOAD
            let length1 = $("#textarea1").val().length;
            $("#lengthCountSect1").text(500 - length1);

            // TEXTAREA TWO COUNT ON PAGE LOAD
            let length2 = $("#textarea2").val().length;
            $("#lengthCountSect2").text(500 - length2);

            // TEXTAREA TWO COUNT ON PAGE LOAD
            let length3 = $("#textarea3").val().length;
            $("#lengthCountSect3").text(500 - length3);

        });

        // TEXTAREA ONE COUNT FUNCTION
        function countCharSectionOne(val) {
            var len = val.value.length;
            if (len >= 500) {
                val.value = val.value.substring(0, 500);
                $('#lengthCountSect1').text(0);
            } else {
                $('#lengthCountSect1').text(500 - len);
            }
        };

        // TEXTAREA TWO COUNT FUNCTION
        function countCharSectionTwo(val) {
            var len = val.value.length;
            if (len >= 500) {
                val.value = val.value.substring(0, 500);
                $('#lengthCountSect2').text(0);
            } else {
                $('#lengthCountSect2').text(500 - len);
            }
        };

        // TEXTAREA TWO COUNT FUNCTION
        function countCharSectionThree(val) {
            var len = val.value.length;
            if (len >= 500) {
                val.value = val.value.substring(0, 500);
                $('#lengthCountSect3').text(0);
            } else {
                $('#lengthCountSect3').text(500 - len);
            }
        };

        document.getElementById('slider_video').addEventListener('change', function (e) {
            const videoPreview = document.getElementById('video-preview');
            const videoSource = document.getElementById('video-source');
            const file = e.target.files[0];

            if (file) {
                const objectURL = URL.createObjectURL(file);
                videoSource.src = objectURL;
                videoPreview.load(); // Reload the video element to update the source
            } else {
                // Clear the video source if no file is selected
                videoSource.src = '';
                videoPreview.load();
            }
        });

        CKEDITOR.replace('textarea1');
        CKEDITOR.replace('textarea2');
        CKEDITOR.replace('textarea3');
    </script>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script>
        $(document).ready(function () {
            $(".image-input").change(function () {
                var formData = new FormData();
                var file = $(this)[0].files[0];

                var fieldName = $(this).data('field-name'); // Get the field name

                formData.append('image', file);
                formData.append('field-name', fieldName); // Append field-name as data

                // console.log(fieldName);
                $.ajax({
                    url: "<?php echo e(route('image_upload')); ?>",
                    type: 'POST',
                    data: formData,
                    contentType: false,
                    processData: false,
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    success: function (response) {
                        // Handle the response from the server (e.g., display success message)
                        console.log('Image uploaded successfully for Image ID: ' + imageId);

                        // Update the field in the table with the image name
                        updateImageNameInTable(imageId, fieldName, response.image_name);
                    },
                    error: function (jqXHR, textStatus, errorMessage) {
                        console.error('Error:', errorMessage);
                    }
                });
            });
        });

        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        // });

    </script>

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

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/servicedemoweb/public_html/global-man-cave/resources/views/admin/page/home.blade.php ENDPATH**/ ?>