<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <?php $__env->startSection('title'); ?>
        System Settings
    <?php $__env->stopSection(); ?>

    <!-- DataTales Example -->
    <form action="<?php echo e(route('admin.general-settings.update',$data->id)); ?>" method="post" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
        <?php echo method_field("PUT"); ?>
        <div class="card shadow mb-4">
            <div class="card-header py-3">
                <h6 class="m-0 font-weight-bold text-primary">
                    System Settings
                </h6>
            </div>
            <div class="card-body">
                <div class="form-group">
                    <label for="system_name" class="mb-0">System Name <span class="text-danger">*</span></label>
                    <input type="text" value="<?php echo e($data->system_name); ?>" name="system_name" id="system_name" class="form-control">
                    <?php $__errorArgs = ['system_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="form-group">
                    <label for="system_logo" class="mb-0">System Logo <span class="text-danger">*</span></label>
                    <input type="file" value="<?php echo e($data->system_logo); ?>" name="system_logo" id="system_logo" class="form-control mb-2">
                    <?php $__errorArgs = ['system_logo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    <?php if($data->system_logo==NULL): ?>
                    <div>
                        <img id="systemlogoPrev" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset('backend/assets/images/prev.jpg')); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php else: ?>
                    <div>
                        <img id="systemlogoPrev" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset($data->system_logo)); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php endif; ?>

                </div>

                <div class="form-group">
                    <label for="system_favicon" class="mb-0">System Fabicon <span class="text-danger">*</span></label>
                    <input type="file" value="<?php echo e($data->system_favicon); ?>" name="system_favicon" id="system_favicon" class="form-control mb-2">
                    <?php $__errorArgs = ['system_favicon'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    <?php if($data->system_favicon==NULL): ?>
                    <div>
                        <img id="systemlogoPrev1" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset('backend/assets/images/prev.jpg')); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php else: ?>
                    <div>
                        <img id="systemlogoPrev1" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset($data->system_logo)); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php endif; ?>

                </div>

                <div class="form-group">
                    <label for="meta_title" class="mb-0">Meta Title <span class="text-danger">*</span></label>
                    <input type="text" value="<?php echo e($data->meta_title); ?>" name="meta_title" value="About Us" class="form-control" />
                    <?php $__errorArgs = ['meta_title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="form-group">
                    <label for="meta_description" class="mb-0">Meta Description <span class="text-danger">*</span></label>
                    <textarea name="meta_description" id="meta_description" class="form-control" rows="4" cols="4">
                        <?php echo @$data->meta_description; ?>

                    </textarea>
                    <?php $__errorArgs = ['meta_description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="form-group">
                    <label for="content" class="mb-0">Keywords <span class="text-danger">*</span></label>
                    <textarea name="meta_keywords" id="meta_keywords" class="form-control" rows="4" cols="4">
                        <?php echo @$data->meta_keywords; ?>

                    </textarea>
                    <?php $__errorArgs = ['meta_keywords'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="form-group">
                    <label for="meta_image" class="mb-0">Meta Image <span class="text-danger">*</span></label>
                    <input value="<?php echo e($data->meta_image); ?>" type="file" name="meta_image" id="meta_image" class="form-control mb-2">
                    <?php $__errorArgs = ['meta_image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="text-danger"><?php echo e($message); ?></span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    <?php if($data->meta_image==NULL): ?>
                    <div>
                        <img id="metaimagePrev" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset('backend/assets/images/prev.jpg')); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php else: ?>
                    <div>
                        <img id="metaimagePrev" class="img-fulid" width="120px" height="120px" style="border: 1px dotted #000" src="<?php echo e(asset($data->meta_image)); ?>" alt="<?php echo e($data->system_name); ?>">
                    </div>
                    <?php endif; ?>

                </div>
            </div>
            <div class="card-footer text-right">
                <button class="btn btn-primary">Update</button>
            </div>
        </div>
    </form>

    <?php $__env->startSection('script'); ?>
    <script>
        $(document).ready(()=>{

        // System Image
          $('#system_logo').change(function(){
            const file = this.files[0];
            console.log(file);
            if (file){
              let reader = new FileReader();
              reader.onload = function(event){
                console.log(event.target.result);
                $('#systemlogoPrev').attr('src', event.target.result);
              }
              reader.readAsDataURL(file);
            }
          });
        // System Fabico
          $('#system_favicon').change(function(){
            const file = this.files[0];
            console.log(file);
            if (file){
              let reader = new FileReader();
              reader.onload = function(event){
                console.log(event.target.result);
                $('#systemlogoPrev1').attr('src', event.target.result);
              }
              reader.readAsDataURL(file);
            }
          });

          // Thumbnail Image
          $('#meta_image').change(function(){
            const file = this.files[0];
            console.log(file);
            if (file){
              let reader = new FileReader();
              reader.onload = function(event){
                console.log(event.target.result);
                $('#metaimagePrev').attr('src', event.target.result);
              }
              reader.readAsDataURL(file);
            }
          });

        });

        $('document').ready(function() {
            $('textarea').each(function() {
                $(this).val($(this).val().trim());
            });
        });

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

 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH /home/doptorbd/hotel.doptor.com.bd/resources/views/admin/settings/system/index.blade.php ENDPATH**/ ?>