<?php $__env->startSection('panel'); ?>
    <div class="row gy-4">
        <?php $__currentLoopData = $templates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $temp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-xl-4 col-md-6">
                <div class="card">
                    <div class="card-header bg--primary d-flex justify-content-between flex-wrap">
                        <h4 class="card-title text-white"> <?php echo e(__(keyToTitle($temp['name']))); ?> </h4>
                        <?php if($general->active_template == $temp['name']): ?>
                            <button type="submit" name="name" value="<?php echo e($temp['name']); ?>" class="btn btn--info">
                                <?php echo app('translator')->get('SELECTED'); ?>
                            </button>
                        <?php else: ?>
                            <form action="" method="post">
                                <?php echo csrf_field(); ?>
                                <button type="submit" name="name" value="<?php echo e($temp['name']); ?>"
                                    class="btn btn--success w-100">
                                    <?php echo app('translator')->get('SELECT'); ?>
                                </button>
                            </form>
                        <?php endif; ?>
                    </div>
                    <div class="card-body p-0">
                        <img src="<?php echo e($temp['image']); ?>" alt="<?php echo app('translator')->get('Template'); ?>" class="w-100">
                    </div>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

        <?php if($extraTemplates): ?>
            <?php $__currentLoopData = $extraTemplates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $temp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col-lg-3">
                    <div class="card">
                        <div class="card-header bg--primary">
                            <h4 class="card-title text-white"> <?php echo e(__(keyToTitle($temp['name']))); ?> </h4>
                        </div>
                        <div class="card-body">
                            <img src="<?php echo e($temp['image']); ?>" alt="<?php echo app('translator')->get('Template'); ?>" class="w-100">
                        </div>
                        <div class="card-footer">
                            <a href="<?php echo e($temp['url']); ?>" target="_blank"
                                class="btn btn--primary w-100"><?php echo app('translator')->get('Purchase Now'); ?></a>
                        </div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php endif; ?>
    </div>
    
    <!-- Modal -->
    <div class="modal fade" id="uploadTemplate">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title"><?php echo app('translator')->get('Upload Template'); ?></h5>
            <button type="button" class="close" data-bs-dismiss="modal">
              <span><i class="las la-times"></i></span>
            </button>
          </div>
          <form action="<?php echo e(route('admin.frontend.templates.upload')); ?>" enctype="multipart/form-data" method="post">
            <?php echo csrf_field(); ?>
            <div class="modal-body">
                <div class="form-group">
					<label><?php echo app('translator')->get('Envato Username'); ?></label>
					<input type="text" name="envato_username" class="form-control" required>
				</div>
                <div class="form-group">
					<label><?php echo app('translator')->get('Email'); ?></label>
					<input type="email" name="email" class="form-control" required>
				</div>
				<div class="form-group">
					<label><?php echo app('translator')->get('Template Purchase Code'); ?></label>
					<input type="text" name="template_purchase_code" class="form-control" required>
				</div>
				<div class="form-group">
					<label><?php echo app('translator')->get('Files'); ?></label>
					<input type="file" name="file" class="form-control" accept=".zip" required>
				</div>
            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn--primary h-45 w-100"><?php echo app('translator')->get('Submit'); ?></button>
            </div>
          </form>
        </div>
      </div>
    </div>
    

<?php $__env->stopSection(); ?>
<?php $__env->startPush('breadcrumb-plugins'); ?>
<div>
    <?php if(!extension_loaded('zip')): ?>
    <span class="text--danger mx-3"><span class="fw-bold text--danger">PHP-zip</span> Extension is required</span>
    <button type="button" disabled class="btn btn-outline--primary btn-sm" data-bs-toggle="modal" data-bs-target="#uploadTemplate"><i class="las la-puzzle-piece"></i><?php echo app('translator')->get('Upload Template'); ?></button>
    <?php else: ?>
    <button type="button" class="btn btn-outline--primary btn-sm" data-bs-toggle="modal" data-bs-target="#uploadTemplate"><i class="las la-puzzle-piece"></i><?php echo app('translator')->get('Upload Template'); ?></button>
    <?php endif; ?>
</div>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/top1/trustpay.56-0.top/core/resources/views/admin/frontend/templates.blade.php ENDPATH**/ ?>