<?php $__env->startSection('content'); ?>

    <!-- Form row -->
    <div class="row">
        <div class="col-xl-12 box-margin height-card">
            <div class="card card-body">
                <h4 class="card-title"><?php echo e(__('content.service_content')); ?></h4>
                <?php if(isset($service_content)): ?>
                    <?php if($demo_mode == "on"): ?>
                        <!-- Include Alert Blade -->
                        <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php else: ?>
                        <form action="<?php echo e(route('service-content.update', $service_content->id)); ?>" method="POST" enctype="multipart/form-data">
                            <?php echo method_field('PUT'); ?>
                            <?php echo csrf_field(); ?>
                            <?php endif; ?>

                            <input name="service_id" type="hidden" value="<?php echo e($id); ?>">

                            <div class="row">
                                <div class="col-md-8">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="summernote"><?php echo e(__('content.description')); ?></label>
                                                <textarea type="text" name="description" class="form-control" id="summernote"><?php echo html_entity_decode($service_content->description); ?></textarea>
                                            </div>
                                        </div>
                                        <div class="col-md-12 box-margin">
                                            <div id="accordion-">
                                                <div class="card mb-2">
                                                    <div class="card-header bg-secondary">
                                                        <a class="collapsed text-white" data-toggle="collapse" href="#accordion-1" aria-expanded="false">
                                                            <?php echo e(__('content.seo_optimization')); ?>

                                                        </a>
                                                    </div>

                                                    <div id="accordion-1" class="collapse" data-parent="#accordion-" style="">
                                                        <div class="card-body">
                                                            <div class="row">
                                                                <div class="col-md-12">
                                                                    <div class="form-group">
                                                                        <label for="meta_description"><?php echo e(__('content.meta_description')); ?> </label>
                                                                        <input id="meta_description" name="meta_description" type="text" class="form-control" value="<?php echo e($service_content->meta_description); ?>">
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-12">
                                                                    <div class="form-group">
                                                                        <label for="meta_keyword"><?php echo e(__('content.meta_keyword')); ?> (<?php echo e(__('content.separate_with_commas')); ?>)</label>
                                                                        <textarea id="meta_keyword" name="meta_keyword" class="form-control"><?php echo e($service_content->meta_keyword); ?></textarea>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="section_image"><?php echo e(__('content.image')); ?> (<?php echo e(__('content.size')); ?> 1080 x 540) (.svg, .jpg, .jpeg, .png, .webp, .gif)</label>
                                                <input type="file" name="section_image" class="form-control-file" id="section_image">
                                                <small class="form-text text-muted"><?php echo e(__('content.please_use_recommended_sizes')); ?></small>
                                            </div>
                                            <div class="height-card box-margin">
                                                <div class="card">
                                                    <div class="card-body">
                                                        <div class="avatar-area text-center">
                                                            <div class="media">
                                                                <?php if(!empty($service_content->section_image)): ?>
                                                                    <a  class="d-block mx-auto" href="#" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo e(__('content.current_image')); ?>">
                                                                        <img src="<?php echo e(asset('uploads/img/service/'.$service_content->section_image)); ?>" alt="image" class="rounded w-25">
                                                                    </a>
                                                                <?php else: ?>
                                                                    <a class="d-block mx-auto" href="#" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo e(__('content.not_yet_created')); ?>">
                                                                        <img src="<?php echo e(asset('uploads/img/dummy/no-image.jpg')); ?>" alt="no image" class="rounded w-25">
                                                                    </a>
                                                                <?php endif; ?>
                                                            </div>
                                                            <?php if(!empty($service_content->section_image)): ?>
                                                                <a class="mt-3 d-block" href="#" data-toggle="modal" data-target="#deleteImageModal<?php echo e($service_content->id); ?>">
                                                                    <i class="fa fa-trash text-danger font-18"></i>
                                                                </a>
                                                            <?php endif; ?>
                                                        </div>
                                                        <!--end card-body-->
                                                    </div>
                                                </div>
                                                <!--end card-->
                                            </div>
                                            <!--end col-->
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <button type="submit" class="btn btn-primary mr-2"><?php echo e(__('content.submit')); ?></button>
                                                <a href="#" class="btn btn-primary" data-toggle="modal" data-target="#serviceContentDestroyModal<?php echo e($service_content->id); ?>">
                                                    <i class="fa fa-trash"></i> <?php echo e(__('content.reset')); ?>

                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </form>

                        <!-- Modal -->
                        <div class="modal fade" id="deleteImageModal<?php echo e($service_content->id); ?>" tabindex="-1" role="dialog" aria-labelledby="deleteImageModalCenterTitle" aria-hidden="true">
                            <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <h5 class="modal-title" id="deleteImageModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body text-center">
                                        <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                    </div>
                                    <div class="modal-footer">
                                        <?php if($demo_mode == "on"): ?>
                                            <!-- Include Alert Blade -->
                                            <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                        <?php else: ?>
                                            <form class="d-inline-block" action="<?php echo e(route('service-content.destroy_image', $service_content->id)); ?>" method="POST">
                                                <?php echo method_field('DELETE'); ?>
                                                <?php echo csrf_field(); ?>
                                                <?php endif; ?>

                                            <button type="button" class="btn btn-danger mr-1" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                            <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Modal -->
                        <div class="modal fade" id="serviceContentDestroyModal<?php echo e($service_content->id); ?>" tabindex="-1" role="dialog" aria-labelledby="serviceContentDestroyModalCenterTitle" aria-hidden="true">
                            <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <h5 class="modal-title" id="serviceContentDestroyModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body text-center">
                                        <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                    </div>
                                    <div class="modal-footer">
                                        <?php if($demo_mode == "on"): ?>
                                            <!-- Include Alert Blade -->
                                            <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                        <?php else: ?>
                                            <form class="d-inline-block" action="<?php echo e(route('service-content.destroy', $service_content->id)); ?>" method="POST">
                                                <?php echo method_field('DELETE'); ?>
                                                <?php echo csrf_field(); ?>
                                                <?php endif; ?>

                                            <button type="button" class="btn btn-danger mr-1" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                            <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>

                    <?php else: ?>
                            <?php if($demo_mode == "on"): ?>
                                <!-- Include Alert Blade -->
                                <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <?php else: ?>
                                <form action="<?php echo e(route('service-content.store')); ?>" method="POST" enctype="multipart/form-data">
                                    <?php echo csrf_field(); ?>
                                    <?php endif; ?>

                                    <input name="service_id" type="hidden" value="<?php echo e($id); ?>">

                                    <div class="row">
                                        <div class="col-md-8">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label for="summernote"><?php echo e(__('content.description')); ?></label>
                                                        <textarea id="summernote" name="description" class="form-control"></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-md-12 box-margin">
                                                    <div id="accordion-">
                                                        <div class="card mb-2">
                                                            <div class="card-header bg-secondary">
                                                                <a class="collapsed text-white" data-toggle="collapse" href="#accordion-1" aria-expanded="false">
                                                                    <?php echo e(__('content.seo_optimization')); ?>

                                                                </a>
                                                            </div>

                                                            <div id="accordion-1" class="collapse" data-parent="#accordion-" style="">
                                                                <div class="card-body">
                                                                    <div class="row">
                                                                        <div class="col-md-12">
                                                                            <div class="form-group">
                                                                                <label for="meta_description"><?php echo e(__('content.meta_description')); ?> </label>
                                                                                <input id="meta_description" name="meta_description" type="text" class="form-control">
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-12">
                                                                            <div class="form-group">
                                                                                <label for="meta_keyword"><?php echo e(__('content.meta_keyword')); ?> (<?php echo e(__('content.separate_with_commas')); ?>)</label>
                                                                                <textarea id="meta_keyword" name="meta_keyword" class="form-control"></textarea>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label for="section_image"><?php echo e(__('content.image')); ?> (<?php echo e(__('content.size')); ?> 1080 x 540) (.svg, .jpg, .jpeg, .png, .webp, .gif)</label>
                                                        <input id="section_image" name="section_image" type="file" class="form-control-file">
                                                        <small class="form-text text-muted"><?php echo e(__('content.please_use_recommended_sizes')); ?></small>
                                                    </div>
                                                </div>
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <button type="submit" class="btn btn-primary col-12"><?php echo e(__('content.submit')); ?></button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </form>
                            <?php endif; ?>
            </div>
        </div>
    </div>
    <!-- end row -->

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

<?php echo $__env->make('layouts.admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/lltrusti/ajayfiresafety/ajay/resources/views/admin/service/content/create.blade.php ENDPATH**/ ?>