<?php $__env->startSection('section', admin_trans('Appearance')); ?>
<?php $__env->startSection('title', admin_trans('Themes')); ?>
<?php $__env->startSection('upload_modal', admin_trans('Upload')); ?>
<?php $__env->startSection('content'); ?>
    <div class="row g-4">
        <?php $__currentLoopData = $themes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $theme): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-lg-6 col-xl-4">
                <div class="card theme-card">
                    <?php if($theme->isActive()): ?>
                        <span class="badge bg-success theme-card-active-badge shadow-sm"><?php echo e(admin_trans('Active')); ?></span>
                    <?php endif; ?>
                    <img src="<?php echo e(asset($theme->preview_image)); ?>" class="card-img-top theme-card-image border-1 border-bottom"
                        alt="<?php echo e($theme->name); ?>">
                    <div class="card-body">
                        <h5 class="card-title theme-card-title">
                            <?php echo e($theme->name); ?>

                            <span>v<?php echo e($theme->version); ?></span>
                        </h5>
                        <p class="card-text theme-card-text"><?php echo e(shorterText($theme->description, 120)); ?></p>
                        <div class="row g-2">
                            <div class="col">
                                <form action="<?php echo e(route('admin.appearance.themes.active', $theme->id)); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <button
                                        class="btn btn-primary btn-md w-100 vironeer-form-confirm <?php echo e($theme->isActive() ? 'disabled' : ''); ?>"><i
                                            class="fa-solid fa-check-double me-2"></i><?php echo e(admin_trans('Make Active')); ?></button>
                                </form>
                            </div>
                            <div class="col-auto">
                                <div class="dropdown">
                                    <button class="btn btn-secondary btn-md w-100 dropdown-toggle" type="button"
                                        id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
                                        <i class="fa fa-ellipsis-v fa-sm"></i>
                                    </button>
                                    <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
                                        <li>
                                            <a class="dropdown-item"
                                                href="<?php echo e(route('admin.appearance.themes.settings.index', $theme->id)); ?>">
                                                <i class="fa fa-cog text-muted me-2"></i>
                                                <?php echo e(admin_trans('Settings')); ?>

                                            </a>
                                        </li>
                                        <li>
                                            <a class="dropdown-item"
                                                href="<?php echo e(route('admin.appearance.themes.custom-css.index', $theme->id)); ?>">
                                                <i class="fa-solid fa-code me-2"></i>
                                                <?php echo e(admin_trans('Custom CSS')); ?>

                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <div class="modal fade" id="uploadModal" tabindex="-1" aria-labelledby="uploadModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <h5 class="modal-header bg-primary text-white mb-0"><?php echo e(admin_trans('Upload a theme')); ?></h5>
                <div class="modal-body p-4">
                    <div class="note note-warning">
                        <h5 class="mb-2"><strong><?php echo e(admin_trans('Important!')); ?></strong></h5>
                        <ul class="mb-0">
                            <li class="mb-1">
                                <?php echo e(admin_trans('Make sure you are uploading the correct files.')); ?>

                            </li>
                            <li class="mb-0">
                                <?php echo e(admin_trans('Before uploading a new theme make sure to take a backup of your website files and database.')); ?>

                            </li>
                        </ul>
                    </div>
                    <form action="<?php echo e(route('admin.appearance.themes.upload')); ?>" method="POST"
                        enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <div class="mb-3">
                            <label class="form-label"><?php echo e(admin_trans('Theme Purchase Code')); ?> </label>
                            <input type="text" name="purchase_code" class="form-control form-control-lg"
                                placeholder="<?php echo e(admin_trans('Purchase code')); ?>" value="<?php echo e(old('purchase_code')); ?>"
                                required>
                        </div>
                        <div class="mb-4">
                            <label class="form-label"><?php echo e(admin_trans('Theme Files (Zip)')); ?> </label>
                            <input type="file" name="theme_files" class="form-control form-control-lg" accept=".zip"
                                required>
                        </div>
                        <div class="row justify-content-center g-3">
                            <div class="col-12 col-lg">
                                <button type="button" class="btn btn-secondary btn-lg w-100" data-bs-dismiss="modal"
                                    aria-label="Close"><?php echo e(admin_trans('Close')); ?></button>
                            </div>
                            <div class="col-12 col-lg">
                                <button class="btn btn-primary btn-lg w-100"><?php echo e(admin_trans('Upload')); ?></button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.grid', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/neofiles.codenine.biz.id/resources/views/backend/appearance/themes/index.blade.php ENDPATH**/ ?>