
<?php $__env->startSection('setting-title'); ?>
    <?php echo e(__('Language Settings')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('setting-content'); ?>
<div class="page-title">
    <div class="container-fluid">
        <div class="row">
            <div class="col">
                <div class="title-content">
                    <h2 class="title"><?php echo e(__('Language Settings')); ?></h2>
                    <div>
                        <a href="<?php echo e(route('admin.language-sync-missing')); ?>" class="title-btn me-2"><i data-lucide="refresh-ccw"></i><?php echo e(__('Sync Missing Translation Keys')); ?></a>
                        <a href="<?php echo e(route('admin.language.create')); ?>" class="title-btn"><i data-lucide="plus-circle"></i><?php echo e(__('Add New')); ?></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row">

        <div class="col-xl-12">
            <div class="site-card-body">
                <div class="site-table table-responsive">
                    <?php echo $__env->make('backend.language.include.__filter', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <table class="table">
                        <thead>
                        <tr>
                            <th><?php echo e(__('Language Name')); ?></th>
                            <th><?php echo e(__('RTL Support')); ?></th>
                            <th><?php echo e(__('Status')); ?></th>
                            <th><?php echo e(__('Action')); ?></th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td>
                                    <?php echo $__env->make('backend.language.include.__name', ['name' => $language->name, 'locale' => $language->locale, 'is_default' => $language->is_default ? true : false], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                </td>
                                <td>
                                    <?php switch($language->is_rtl):
                                        case (0): ?>
                                            <div class="site-badge pending"><?php echo e(__('No')); ?></div>
                                            <?php break; ?>
                                        <?php case (1): ?>
                                            <div class="site-badge success"><?php echo e(__('Yes')); ?></div>
                                            <?php break; ?>
                                    <?php endswitch; ?>
                                </td>
                                <td>
                                    <?php echo $__env->make('backend.language.include.__status', ['status' => $language->status], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                </td>
                                <td>
                                    <?php echo $__env->make('backend.language.include.__action', ['id' => $language->id, 'locale' => $language->locale, 'is_default' => $language->is_default, 'name' => $language->name], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>

                    <?php echo e($languages->links('backend.include.__pagination')); ?>

                </div>
            </div>

            <!-- Modal for Delete Language -->
            <div
                class="modal fade"
                id="deleteLanguage"
                tabindex="-1"
                aria-labelledby="deleteLanguageModalLabel"
                aria-hidden="true"
            >
                <div
                    class="modal-dialog modal-md modal-dialog-centered"
                >
                    <div class="modal-content site-table-modal">
                        <div class="modal-body popup-body">
                            <button
                                type="button"
                                class="btn-close"
                                data-bs-dismiss="modal"
                                aria-label="Close"
                            ></button>
                            <div class="popup-body-text centered">
                                <div class="info-icon">
                                    <i data-lucide="alert-triangle"></i>
                                </div>
                                <div class="title">
                                    <h4><?php echo e(__('Are you sure?')); ?></h4>
                                </div>
                                <p>
                                    <?php echo e(__('You want to delete')); ?> <strong
                                        id="language-name"></strong> <?php echo e(__('Language?')); ?>

                                </p>
                                <div class="action-btns">
                                    <form id="deleteLanguageForm" method="post">
                                        <?php echo method_field('DELETE'); ?>
                                        <?php echo csrf_field(); ?>
                                        <button type="submit" class="site-btn-sm primary-btn me-2">
                                            <i data-lucide="check"></i>
                                            <?php echo e(__('Confirm')); ?>

                                        </button>
                                        <a href="" class="site-btn-sm red-btn" type="button"
                                           data-bs-dismiss="modal" aria-label="Close"><i
                                                data-lucide="x"></i><?php echo e(__('Cancel')); ?></a>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Modal for Delete Language End-->

        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script>
        (function ($) {
            "use strict";

            $('body').on('click', '#deleteLanguageModal', function () {
                var id = $(this).data('id');
                var name = $(this).data('name');

                $('#language-name').html(name);
                var url = '<?php echo e(route("admin.language.destroy", ":id")); ?>';
                url = url.replace(':id', id);
                $('#deleteLanguageForm').attr('action', url);
                $('#deleteLanguage').modal('toggle')

            })

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

<?php echo $__env->make('backend.setting.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/mxawfis.atharvatek.com/resources/views/backend/language/index.blade.php ENDPATH**/ ?>