<?php $__env->startSection('title'); ?>
<?php echo app('translator')->get('system_settings.language_settings'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('mainContent'); ?>
    <section class="sms-breadcrumb mb-40 white-box">
        <div class="container-fluid">
            <div class="row justify-content-between">
                <h1><?php echo app('translator')->get('system_settings.language_settings'); ?></h1>
                <div class="bc-pages">
                    <a href="<?php echo e(route('dashboard')); ?>"><?php echo app('translator')->get('common.dashboard'); ?></a>
                    <a href="#"><?php echo app('translator')->get('system_settings.system_settings'); ?></a>
                    <a href="#"><?php echo app('translator')->get('system_settings.language_settings'); ?></a>

                </div>
            </div>
        </div>
    </section>

    <section class="admin-visitor-area">
        <div class="container-fluid p-0">
            <?php if(isset($edit_languages)): ?>
                <?php if(userPermission(452)): ?>
                    <div class="row">
                        <div class="offset-lg-10 col-lg-2 text-right col-md-12 mb-20">
                            <a href="<?php echo e(route('marks-grade')); ?>" class="primary-btn small fix-gr-bg">
                                <span class="ti-plus pr-2"></span>
                                <?php echo app('translator')->get('common.add'); ?>
                            </a>
                        </div>
                    </div>
                <?php endif; ?>
            <?php endif; ?>
            <div class="row">
            <?php if(moduleStatusCheck('Saas')== FALSE   ): ?>
                <div class="col-lg-3">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="main-title">
                                <h3 class="mb-30"><?php if(isset($edit_languages)): ?>
                                        <?php echo app('translator')->get('system_settings.edit_language'); ?>
                                    <?php else: ?>
                                        <?php echo app('translator')->get('system_settings.add_language'); ?>
                                    <?php endif; ?>
                                  
                                </h3>
                            </div>
                           
                            <?php if(isset($selected_languages)): ?>
                                <?php echo e(Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'language-update', 'method' => 'POST', 'enctype' => 'multipart/form-data'])); ?>

                            <?php else: ?>
                                <?php if(userPermission(452)): ?>
                                    <?php echo e(Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'language-add',
                                    'method' => 'POST', 'enctype' => 'multipart/form-data'])); ?>

                                <?php endif; ?>
                            <?php endif; ?>
                            <div class="white-box">
                                <div class="add-visitor">

                                    <?php if(isset($select_language)): ?>
                                        <input type="hidden" name="id" value="<?php echo e(@$select_language->id); ?>">

                                    <?php endif; ?>

                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="input-effect">
                                                <select
                                                    class="niceSelect w-100 bb form-control <?php echo e($errors->has('lang_id') ? ' is-invalid' : ''); ?>"
                                                    name="lang_id" id="lang_id">
                                                    <option data-display="<?php echo app('translator')->get('system_settings.select_language'); ?> *"
                                                            value=""><?php echo app('translator')->get('system_settings.select_language'); ?> *</option>
                                                    <?php $__currentLoopData = $all_languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($lang->id); ?>"
                                                            <?php echo e(isset($select_language) ? (@$select_language->lang_id == @$lang->id )? 'selected':'':''); ?>

                                                        > <?php echo e(@$lang->name); ?> - <?php echo e(@$lang->native); ?> </option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                                <?php if($errors->has('lang_id')): ?>
                                                    <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($errors->first('lang_id')); ?></strong>
                                                </span>
                                                <?php endif; ?>
                                            </div>


                                        </div>
                                    </div>

                                    <?php 
                                        $tooltip = "";
                                        if(userPermission(452)){
                                                $tooltip = "";
                                            }else{
                                                $tooltip = "You have no permission to add";
                                            }
                                    ?>
                                    <div class="row mt-40">
                                        <div class="col-lg-12 text-center">
                                            <button class="primary-btn fix-gr-bg submit" data-toggle="tooltip" title="<?php echo e(@$tooltip); ?>">
                                                <span class="ti-check"></span>
                                                <?php if(isset($select_language)): ?>
                                                    <?php echo app('translator')->get('system_settings.update_language'); ?>
                                                <?php else: ?>
                                                    <?php echo app('translator')->get('system_settings.save_language'); ?>
                                                <?php endif; ?>
                                              
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php echo e(Form::close()); ?>

                        </div>
                    </div>
                </div>
            <?php endif; ?>
            <?php if(moduleStatusCheck('Saas')== FALSE   ): ?>                                            
                <div class="col-lg-9">
            <?php endif; ?>

            <?php if(moduleStatusCheck('Saas')== TRUE   ): ?>                                            
                <div class="col-lg-12">
            <?php endif; ?>
                    <div class="row">
                        <div class="col-lg-4 no-gutters">
                            <div class="main-title">
                                <h3 class="mb-30"><?php echo app('translator')->get('system_settings.language_list'); ?></h3>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-lg-12">
                            
                            <table id="default_table" class="display school-table" cellspacing="0" width="100%">
                                <thead>
                                
                                <tr>
                                    <th><?php echo app('translator')->get('common.sl'); ?></th>
                                    <th><?php echo app('translator')->get('system_settings.language'); ?></th>
                                    <th><?php echo app('translator')->get('system_settings.native'); ?></th>
                                    <th><?php echo app('translator')->get('system_settings.universal'); ?></th>

                                    <th><?php echo app('translator')->get('common.status'); ?></th>
                                    <th><?php echo app('translator')->get('common.action'); ?></th>
                                </tr>
                                </thead>

                                <tbody>
                                <?php
                                    $i=0;
                                    @$active     = 'primary-btn-small-input primary-btn small fix-gr-bg';
                                    @$inactive   =  'primary-btn small tr-bg';
                                ?>

                                <?php $__currentLoopData = $sms_languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sms_language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e(++$i); ?>

                                        <td><?php echo e(@$sms_language->language_name); ?></td>
                                        <td><?php echo e(@$sms_language->native); ?></td>
                                        <td><?php echo e(@$sms_language->language_universal); ?></td>


                                        <td>
                                        <?php if(@$sms_language->active_status==1): ?>
                                            <!-- <span class="badge badge-pill badge-success"></span> -->
                                                <strong>Active</strong>

                                        <?php else: ?>
                                            <!-- <span class="badge badge-pill badge-secondary"></span> -->
                                                In Active
                                            <?php endif; ?>

                                        </td>
                                        <td>

                                            <?php if(@$sms_language->active_status==1): ?>
                                                <a href="<?php echo e(route('change-language',@$sms_language->id)); ?>"
                                                   class="<?php echo e(@$sms_language->active_status==1?@$active:@$inactive); ?> "   > <span
                                                        class="ti-check"></span> <?php echo app('translator')->get('system_settings.default'); ?></a>
                                            <?php else: ?>
                                                <?php if(userPermission(453)): ?>
                                                <a href="<?php echo e(route('change-language',@$sms_language->id)); ?>"
                                                    class="<?php echo e(@$sms_language->active_status==1?@$active:@$inactive); ?> "   > <span
                                                            class="ti-check"></span> <?php echo app('translator')->get('system_settings.make_default'); ?></a>
                                                <?php endif; ?>
                                            <?php endif; ?>

                                            

                                           <?php if(moduleStatusCheck('Saas') == FALSE): ?> 

                                            <?php if(userPermission(453) ): ?>
                                            <a href="<?php echo e(route('language-setup',@$sms_language->language_universal)); ?> "
                                               class="primary-btn small tr-bg white_space"> <span
                                                    class="ti-settings"></span> <?php echo app('translator')->get('system_settings.setup'); ?> </a>
                                                <?php endif; ?>
                                                    <?php if($sms_language->language_universal !='en' && $sms_language->active_status==0): ?>
                                              <?php if(userPermission(455)): ?>
                                                    <a 
                                                   href="<?php echo e(route('language-delete')); ?>" class="primary-btn small tr-bg white_space" data-toggle="modal"
                                                   data-target="#deleteLanguage<?php echo e(@$sms_language->id); ?>" >
                                                    <span class="ti-close"></span> <?php echo app('translator')->get('system_settings.remove'); ?> 
                                              </a>
                                            <?php endif; ?>

                                            <?php endif; ?>
                                        <?php endif; ?>

                                        

                                            <div class="modal fade admin-query"
                                                 id="deleteLanguage<?php echo e(@$sms_language->id); ?>">
                                                <div class="modal-dialog modal-dialog-centered">
                                                    <div class="modal-content">
                                                        <div class="modal-header">
                                                            <h4 class="modal-title"><?php echo app('translator')->get('system_settings.delete_language'); ?></h4>
                                                            <button type="button" class="close" data-dismiss="modal">
                                                                &times;
                                                            </button>
                                                        </div>

                                                        <div class="modal-body">
                                                            <div class="text-center">
                                                                <h4><?php echo app('translator')->get('system_settings.are_you_sure_to_remove'); ?></h4>
                                                            </div>

                                                            <div class="mt-40 d-flex justify-content-between">
                                                                <button type="button" class="primary-btn tr-bg"
                                                                        data-dismiss="modal"><?php echo app('translator')->get('common.cancel'); ?></button>
                                                                <?php echo e(Form::open(['route' => 'language-delete', 'method' => 'post', 'enctype' => 'multipart/form-data'])); ?>

                                                                <input type="hidden" name="id"
                                                                       value="<?php echo e(@$sms_language->id); ?>">
                                                                <button class="primary-btn fix-gr-bg"
                                                                        type="submit"><?php echo app('translator')->get('system_settings.remove'); ?></button>
                                                                <?php echo e(Form::close()); ?>

                                                            </div>
                                                        </div>

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


                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </section>

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

<?php echo $__env->make('backEnd.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\infix\resources\views/backEnd/systemSettings/languageSettings.blade.php ENDPATH**/ ?>