<?php $__env->startSection('content'); ?>
<br>

<div style="background-color: rgb(255, 255, 255);" class="container pt-2 pb-1 mt-2 rounded shadow-sm">
    <div class="row">
        <div class="col-12" align="center"><h2 class="text--base">Referral Link</h2></div>
    </div>
    <div class="row pt-2 pb-2">
        <div class="col-12" align="center"><input class="form-control" type="text" value="<?php echo 'https://'. $_SERVER['HTTP_HOST'] ?>/user/register?reference=<?php echo e(auth()->user()->username); ?>" id="referralURL" readonly=""></div>
        <div class="col-12 pt-2" align="center"> <h4 class="btn-primary bg--primary text-white rounded p-1" id="copyBoard"><i class="fa fa-copy"></i> Copy</h4></div>
    </div>
</div>

<section class="cmn-section">
    <div class="container">
        <div class="row py-2">
            <div class="col-md-12 mb-30">
                <div class="card">
                    <div class="card-body p-0">
                        <div class="table-responsive-sm">
                            <table class="table">
                                <thead class="thead-dark">
                                <tr>
                                    <th><?php echo app('translator')->get('Full Name'); ?></th>
                                    <th><?php echo app('translator')->get('User Name'); ?></th>
                                    <th><?php echo app('translator')->get('Email'); ?></th>
                                    <th><?php echo app('translator')->get('Mobile'); ?></th>
                                    <th><?php echo app('translator')->get('Plan'); ?></th>
                                </tr>
                                </thead>
                                <tbody>
                                    <?php $__empty_1 = true; $__currentLoopData = $refUsers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td data-label="<?php echo app('translator')->get('Full Name'); ?>"><?php echo e(__($log->fullname)); ?></td>
                                        <td data-label="<?php echo app('translator')->get('User Name'); ?>"><?php echo e(__($log->username)); ?></td>
                                        <td data-label="<?php echo app('translator')->get('Email'); ?>"><?php echo e($log->email); ?></td>
                                        <td data-label="<?php echo app('translator')->get('Phone'); ?>"><?php echo e($log->mobile); ?></td>
                                        <td data-label="<?php echo app('translator')->get('Plan'); ?>"><?php echo e(__($log->plan ? $log->plan->name : "No Plan")); ?></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="100%" class="text-center"> <?php echo e(__($emptyMessage)); ?></td>
                                    </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <?php echo e(paginateLinks($refUsers)); ?>

            </div>
        </div>
    </div>
</section>
<div class="py-5"></div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('style'); ?>
<style type="text/css">
    .copytextDiv{
        border:1px solid #00000021;
        cursor: pointer;
    }
    #referralURL{
        border-right: 1px solid #00000021;
    }
    .bg-success-custom{
        background-color: #28a7456e!important;
    }
    .brd-success-custom{
        border: 1px dashed #28a745;
    }
</style>
<?php $__env->stopPush(); ?>
<?php $__env->startPush('script'); ?>
<script type="text/javascript">
    (function ($) {
        "use strict";
        $('#copyBoard').click(function(){
            var copyText = document.getElementById("referralURL");
            copyText.select();
            copyText.setSelectionRange(0, 99999);
            /*For mobile devices*/
            document.execCommand("copy");
            iziToast.success({message: "Copied: " + copyText.value, position: "topRight"});
        });
    })(jQuery);
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make($activeTemplate.'layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u134890016/public_html/core/resources/views/templates/smartlab/user/referred.blade.php ENDPATH**/ ?>