<?php $__env->startSection('container'); ?>
    <section class="section">
        <div class="section-body">
            <div class="col-12 col-md-12 col-lg-12">
                <div class="card">
                    <div class="card-header">
                        <h4><?php echo e(__('Downloads')); ?></h4>
                        <div class="card-header-action">
                            <a href="<?php echo e(route('downloads.create')); ?>" class="btn btn-icon icon-left btn-primary">
                                <i class="fas fa-solid fa-download"></i>
                                <?php echo e(__('Add New Downloads')); ?>

                            </a>
                        </div>

                    </div>


                    <div class="card-body p-0">
                        <div class="table-responsive">
                            <table class="table table-striped table-md">
                                <tbody>
                                    <tr>
                                        <th class="text-center"><?php echo __('Downloads Name'); ?></th>
                                        <th class="text-center"><?php echo __('Description'); ?></th>
                                        <th class="text-center"><?php echo __('File'); ?></th>
                                        <th class="text-center"><?php echo __('Allow Guest'); ?></th>
                                        <th class="text-center"><?php echo __('Actions'); ?></th>
                                    </tr>

                                    <?php $__currentLoopData = $downloads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $download): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td class="text-center"><?php echo e($download->name); ?></td>
                                            <td class="text-center"><?php echo e($download->description); ?></td>
                                            <td class="text-center">
                                                <a href="<?php echo e(route('downloads.download', $download->id)); ?>">
                                                    <i class="fas fa-file-archive"></i> Download ZIP
                                                </a>
                                            </td>

                                            <td class="text-center">
                                                <?php if($download->allow_guest): ?>
                                                    <span class="badge badge-success">Yes</span>
                                                <?php else: ?>
                                                    <span class="badge badge-danger">No</span>
                                                <?php endif; ?>
                                            </td>


                                            <td class="text-center">
                                                <a href="<?php echo e(route('downloads.download', $download->id)); ?>"
                                                    class="btn btn-primary mr-2" title="<?php echo __('Download'); ?>">
                                                    <i class="fas fa-download"></i>
                                                </a>
                                                <a href="<?php echo e(route('downloads.edit', $download->id)); ?>"
                                                    class="btn btn-warning mr-2" title="<?php echo __('Edit'); ?>">
                                                    <i class="fas fa-edit"></i>
                                                </a>

                                                <form action="<?php echo e(route('downloads.destroy', $download->id)); ?>"
                                                    method="post" style="display: inline-block;">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <button type="submit" class="btn btn-danger"
                                                        title="<?php echo __('Delete'); ?>"
                                                        onclick="return confirm('Are you sure you want to delete this download?')">
                                                        <i class="fas fa-trash-alt"></i>
                                                    </button>
                                                </form>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="card-footer text-right">
                        <?php echo e($downloads->links(AdminTheme::pagination())); ?>

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

<?php $__env->startSection('css_libraries'); ?>
    <link rel="stylesheet" href="<?php echo e(asset(AdminTheme::assets('modules/summernote/summernote-bs4.css'))); ?>" />
    <link rel="stylesheet" href="<?php echo e(asset(AdminTheme::assets('modules/select2/dist/css/select2.min.css'))); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_libraries'); ?>
    <script src="<?php echo e(asset(AdminTheme::assets('modules/summernote/summernote-bs4.js'))); ?>"></script>
    <script src="<?php echo e(asset(AdminTheme::assets('modules/select2/dist/js/select2.full.min.js'))); ?>"></script>
    <script src="https://kit.fontawesome.com/your-fontawesome-kit.js" crossorigin="anonymous"></script>
<?php $__env->stopSection(); ?>

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