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

    <div class="row">
        <div class="col-12 box-margin">
            <div class="card">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center mb-20">
                        <h6 class="card-title mb-0"><?php echo e(__('content.languages')); ?></h6>
                    </div>
                <?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('language.update_language')); ?>" method="POST">
                            <?php echo method_field('PATCH'); ?>
                            <?php echo csrf_field(); ?>
                            <?php endif; ?>

                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="language_id"><?php echo e(__('content.default_site_language')); ?></label>
                                    <select class="form-control" name="language_id" id="language_id" required>
                                        <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($lang->id); ?>" <?php echo e($lang->default_site_language == 1 ? 'selected' : ''); ?>><?php echo e($lang->language_name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php unset($lang); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-12">
                                <button type="submit" class="btn btn-primary">
                                    <?php echo e(__('content.submit')); ?>

                                </button>
                            </div>
                        </div>
                    </form>

                </div> <!-- end card body-->
            </div> <!-- end card -->
        </div><!-- end col-->
    </div><!-- end row-->

    <div class="row">
        <div class="col-12 box-margin">
            <div class="card">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center mb-20">
                        <h6 class="card-title mb-0"><?php echo e(__('content.languages')); ?></h6>
                        <div>
                            <button type="button" class="btn btn-primary float-right mb-3" data-toggle="modal" data-target="#languageModal">+ <?php echo e(__('content.add_language')); ?></button>
                        </div>
                    </div>

                    <?php if(count($languages) > 0): ?>
                        <table id="basic-datatable" class="table table-striped dt-responsive w-100">
                            <thead>
                            <tr>
                                <th scope="col">#</th>
                                <th><?php echo e(__('content.language_name')); ?></th>
                                <th><?php echo e(__('content.language_code')); ?></th>
                                <th><?php echo e(__('content.direction')); ?></th>
                                <th><?php echo e(__('content.keywords')); ?></th>
                                <th><?php echo e(__('content.display_dropdown')); ?></th>
                                <th class="custom-width-action"><?php echo e(__('content.action')); ?></th>
                            </tr>
                            </thead>

                            <tbody>
                            <?php $i = 1; ?>
                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($i++); ?></td>
                                    <td><?php echo e($language->language_name); ?></td>
                                    <td><?php echo e($language->language_code); ?></td>
                                    <td>
                                        <?php if($language->direction == 0): ?>
                                            <span class="badge badge-pill badge-success-lighten"><?php echo e(__('ltr')); ?></span>
                                        <?php else: ?>
                                            <span class="badge badge-pill badge-success"><?php echo e(__('rtl')); ?></span>
                                        <?php endif; ?>
                                    </td>
                                    <td>
                                        <a href="<?php echo e(url('admin/language-keyword-for-adminpanel/create/'. $language->id)); ?>" class="btn btn-primary"><?php echo e(__('content.for_admin_panel')); ?></a>
                                        <a href="<?php echo e(url('admin/language-keyword-for-frontend/frontend-create/'. $language->id)); ?>"  class="btn btn-primary"><?php echo e(__('content.for_frontend')); ?></a>
                                    </td>
                                    <td>
                                    <?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('language.update_display_dropdown', $language->id)); ?>" method="POST">
                                                <?php echo method_field('PATCH'); ?>
                                                <?php echo csrf_field(); ?>
                                                <?php endif; ?>

                                            <?php if($language->display_dropdown == 1): ?>
                                                <button type="submit" class="btn btn-danger">
                                                    <?php echo e(__('content.hide')); ?>

                                                </button>
                                            <?php else: ?>
                                                <button type="submit" class="btn btn-success">
                                                    <?php echo e(__('content.show')); ?>

                                                </button>
                                            <?php endif; ?>
                                        </form>
                                    </td>
                                    <td>
                                        <div>
                                            <a href="<?php echo e(route('language.edit', $language->id)); ?>" class="mr-2">
                                                <i class="fa fa-edit text-info font-18"></i>
                                            </a>
                                            <?php if($language->id != 1): ?>

                                                <a href="#" data-toggle="modal" data-target="#deleteModal<?php echo e($language->id); ?>">
                                                    <i class="fa fa-trash text-danger font-18"></i>
                                                </a>

                                            <?php endif; ?>
                                        </div>
                                    </td>
                                </tr>

                                <!-- Modal -->
                                <div class="modal fade" id="deleteModal<?php echo e($language->id); ?>" tabindex="-1" role="dialog">
                                    <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <h5 class="modal-title" id="languageModalCenterTitle"><?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('language.destroy', $language->id)); ?>" method="POST">
                                                        <?php echo method_field('DELETE'); ?>
                                                        <?php echo csrf_field(); ?>
                                                        <?php endif; ?>

                                                    <button type="button" class="btn btn-danger" 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 endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php unset($language); ?>
                            </tbody>
                        </table>
                    <?php else: ?>
                        <span><?php echo e(__('content.not_yet_created')); ?></span>
                    <?php endif; ?>

                </div> <!-- end card body-->
            </div> <!-- end card -->
        </div><!-- end col-->
    </div><!-- end row-->
    <div class="modal fade" id="languageModal" tabindex="-1" role="dialog" aria-labelledby="languageModalLabel" aria-modal="false">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title mt-0 font-16" id="languageModalLabel"><?php echo e(__('content.add_new')); ?></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                </div>
                <div class="modal-body">
                <?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('language.store')); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <?php endif; ?>

                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="language_name"><?php echo e(__('content.language_name')); ?> <span class="text-red">*</span></label>
                                    <input type="text" name="language_name" class="form-control" id="language_name" required>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="language_code"><?php echo e(__('content.language_code')); ?> <span class="text-red">*</span></label>
                                    <input type="text" name="language_code" class="form-control" id="language_code" required>
                                </div>
                            </div>
                            <div class="col-xl-12">
                                <div class="form-group">
                                    <label for="direction" class="col-form-label"><?php echo e(__('content.direction')); ?> </label>
                                    <select class="form-control" name="direction" id="direction">
                                        <option value="0" selected><?php echo e(__('content.select_your_option')); ?></option>
                                        <option value="0"><?php echo e(__('ltr')); ?></option>
                                        <option value="1"><?php echo e(__('rtl')); ?></option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-xl-12">
                                <div class="form-group">
                                    <label for="display_dropdown" class="col-form-label"><?php echo e(__('content.display_dropdown')); ?> </label>
                                    <select class="form-control" name="display_dropdown" id="display_dropdown">
                                        <option value="1" selected><?php echo e(__('content.select_your_option')); ?></option>
                                        <option value="1"><?php echo e(__('content.show')); ?></option>
                                        <option value="0"><?php echo e(__('content.hide')); ?></option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <button type="submit" class="btn btn-sm btn-primary"><?php echo e(__('content.submit')); ?></button>
                    </form>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

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

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