<?php $__env->startSection('container'); ?>
    <div class="row justify-content-center">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header"><?php echo __('admin.pages'); ?></div>

                <div class="card-body">
                    <a href="<?php echo e(route('pages.create')); ?>" class="btn btn-primary"><?php echo __('admin.create_page'); ?></a>
                    <hr>
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th><?php echo __('admin.id'); ?></th>
                                <th><?php echo __('admin.name'); ?></th>
                                <th><?php echo __('admin.url', ['default' => 'URL']); ?></th>
                                <th><?php echo __('admin.status'); ?></th>
                                <th class="text-right"><?php echo __('admin.actions'); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($page->id); ?></td>
                                    <td><?php echo e($page->title); ?></td>
                                    <td>
                                        <a href="<?php echo e(route('page', $page->path)); ?>" target="_blank"
                                           data-bs-toggle="tooltip" data-bs-placement="top"
                                           title="<?php echo e(route('page', $page->path)); ?>"><?php echo e(__('admin.link')); ?></a>
                                    </td>
                                    <td><?php if($page->is_enabled): ?>
                                            <i class="fas fa-solid fa-circle text-success "
                                               style="font-size: 11px;"></i> <?php echo __('admin.active'); ?>

                                        <?php else: ?>
                                            <i class="fas fa-solid fa-circle text-danger "
                                               style="font-size: 11px;"></i> <?php echo __('admin.inactive'); ?>

                                        <?php endif; ?>
                                    </td>
                                    <td class="text-right">
                                        <a href="<?php echo e(route('pages.translation', $page->id)); ?>"
                                           class="btn btn-primary">
                                            <i class="fas fa-language" data-bs-toggle="tooltip"
                                               data-bs-placement="top"
                                               title="<?php echo e(__('admin.translations')); ?>"></i>
                                        </a>
                                        <a href="<?php echo e(route('pages.edit', $page->id)); ?>"
                                           class="btn btn-primary">
                                            <i class="fas fa-edit" data-bs-toggle="tooltip"
                                               data-bs-placement="top"
                                               title="<?php echo e(__('admin.edit')); ?>"></i>
                                        </a>

                                        <form action="<?php echo e(route('pages.destroy', $page->id)); ?>" method="POST"
                                              style="display: inline-block;">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                            <button onclick="deleteItem(event)" type="submit"
                                                    class="btn btn-danger">
                                                <i class="fas fa-trash-alt"
                                                   data-bs-toggle="tooltip"
                                                   data-bs-placement="top"
                                                   title="<?php echo e(__('admin.delete')); ?>"></i>
                                            </button>
                                        </form>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make(AdminTheme::wrapper(), ['title' =>  __('admin.pages'), 'keywords' => 'WemX Dashboard, WemX Panel'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/wemx/resources/themes/admin/default/pages/index.blade.php ENDPATH**/ ?>