<?php $__env->startSection('master'); ?>
    <?php
        $kycContent = getContent('kyc_instructions.content', true);
    ?>

    <style>
            .btn.widget-card__deposit{
                background: orange;
                padding: 3px 10px;
                font-size: 14px;
                font-weight: 400;
                font-family: rubik;
                border-radius: 3px;
            }
    </style>
    <div class="row gy-4 loginDashboard">
        <div class="col-12">
            <h5 class="mb-3 mt-0">
                <?php echo app('translator')->get('Referral Link'); ?>
            </h5>
            <div class="qr-code text--base mb-1" style="color: white">
                <div class="qr-code-copy-form" data-copy=true>
                    <input id="qr-code-text" type="text" value="<?php echo e(route('home')); ?>?reference=<?php echo e($user->referral_code); ?>" readonly style="color: white">
                    <button class="text-copy-btn copy-btn lh-1 text-white" data-bs-toggle="tooltip" data-bs-original-title="<?php echo app('translator')->get('Copy to clipboard'); ?>" type="button"><?php echo app('translator')->get('Copy</'); ?></button>
                </div>
            </div>
        </div>
        <div class="col-12">
            <?php if($user->kv == Status::KYC_UNVERIFIED && $user->kyc_rejection_reason): ?>
                <div class="alert alert-danger mt-0" role="alert">
                    <div class="d-flex justify-content-between align-items-center flex-wrap gap-2">
                        <h5 class="m-0"><?php echo app('translator')->get('KYC Documents Rejected'); ?></h5>
                        <button class="btn btn--danger btn--sm" data-bs-toggle="modal" data-bs-target="#kycRejectionReason"><?php echo app('translator')->get('Show Reason'); ?></button>
                    </div>
                    <hr>
                    <p class="mb-0">
                        <?php echo e(__(@$kyc->data_values->reject)); ?>

                        <a href="<?php echo e(route('user.kyc.form')); ?>"><?php echo app('translator')->get('Click Here to Re-submit Documents'); ?></a>.
                    </p>
                    <p class="mb-0">
                        <a href="<?php echo e(route('user.kyc.data')); ?>"><?php echo app('translator')->get('See KYC Data'); ?></a>
                    </p>
                </div>
            <?php elseif($user->kv == Status::KYC_UNVERIFIED): ?>
                <div class="alert alert-warning mt-0" role="alert">
                    <h5 class="m-0"><?php echo app('translator')->get('KYC Verification Required'); ?></h5>
                    <hr>
                    <p class="mb-0">
                        <?php echo e(__(@$kycContent->data_values->for_verification)); ?>

                        <a class="text--base" href="<?php echo e(route('user.kyc.form')); ?>"><?php echo app('translator')->get('Click Here to Submit Documents'); ?></a>
                    </p>
                </div>
            <?php elseif($user->kv == Status::KYC_PENDING): ?>
                <div class="alert alert-info" role="alert">
                    <h5 class="m-0"><?php echo app('translator')->get('KYC Verification Pending'); ?></h5>
                    <hr>
                    <p class="mb-0">
                        <?php echo e(__(@$kycContent->data_values->for_pending)); ?>

                        <a class="text--base" href="<?php echo e(route('user.kyc.data')); ?>"><?php echo app('translator')->get('See KYC data'); ?></a>
                    </p>
                </div>
            <?php endif; ?>
        </div>

        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Total Deposited','link' => ''.e(route('user.deposit.history')).'','icon' => 'las la-wallet','amount' => ''.e(showAmount($widget['totalDeposit'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Total Deposited','link' => ''.e(route('user.deposit.history')).'','icon' => 'las la-wallet','amount' => ''.e(showAmount($widget['totalDeposit'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Total Withdrawan','link' => ''.e(route('user.withdraw.history')).'','icon' => 'las la-money-bill-wave','amount' => ''.e(showAmount($widget['totalWithdraw'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Total Withdrawan','link' => ''.e(route('user.withdraw.history')).'','icon' => 'las la-money-bill-wave','amount' => ''.e(showAmount($widget['totalWithdraw'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Total Bet','link' => ''.e(route('user.bets')).'','icon' => 'las la-gamepad','amount' => ''.e(getAmount($widget['totalBet'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Total Bet','link' => ''.e(route('user.bets')).'','icon' => 'las la-gamepad','amount' => ''.e(getAmount($widget['totalBet'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Pending Bet','link' => ''.e(route('user.bets')).'','icon' => 'las la-spinner','amount' => ''.e(getAmount($widget['pendingBet'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Pending Bet','link' => ''.e(route('user.bets')).'','icon' => 'las la-spinner','amount' => ''.e(getAmount($widget['pendingBet'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Won Bet','link' => ''.e(route('user.bets', 'win')).'','icon' => 'las la-trophy','amount' => ''.e(getAmount($widget['wonBet'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Won Bet','link' => ''.e(route('user.bets', 'win')).'','icon' => 'las la-trophy','amount' => ''.e(getAmount($widget['wonBet'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Lose Bet','link' => ''.e(route('user.bets', 'lose')).'','icon' => 'las la-frown','amount' => ''.e(getAmount($widget['loseBet'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Lose Bet','link' => ''.e(route('user.bets', 'lose')).'','icon' => 'las la-frown','amount' => ''.e(getAmount($widget['loseBet'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Refunded Bet','link' => ''.e(route('user.bets', 'refunded')).'','icon' => 'las la-undo-alt','amount' => ''.e(getAmount($widget['refundedBet'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Refunded Bet','link' => ''.e(route('user.bets', 'refunded')).'','icon' => 'las la-undo-alt','amount' => ''.e(getAmount($widget['refundedBet'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-sm-6 col-lg-6 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Transaction','link' => ''.e(route('user.transactions')).'','icon' => 'las la-exchange-alt','amount' => ''.e(getAmount($widget['totalTransaction'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Transaction','link' => ''.e(route('user.transactions')).'','icon' => 'las la-exchange-alt','amount' => ''.e(getAmount($widget['totalTransaction'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-12 col-xl-4">
            <?php if (isset($component)) { $__componentOriginal51a2d661ffc9618691cbedea3fd14983 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal51a2d661ffc9618691cbedea3fd14983 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user-dashboard-widget','data' => ['title' => 'Support Tickets','link' => ''.e(route('ticket.index')).'','icon' => 'las la-ticket-alt','amount' => ''.e(getAmount($widget['totalTicket'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('user-dashboard-widget'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Support Tickets','link' => ''.e(route('ticket.index')).'','icon' => 'las la-ticket-alt','amount' => ''.e(getAmount($widget['totalTicket'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $attributes = $__attributesOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__attributesOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal51a2d661ffc9618691cbedea3fd14983)): ?>
<?php $component = $__componentOriginal51a2d661ffc9618691cbedea3fd14983; ?>
<?php unset($__componentOriginal51a2d661ffc9618691cbedea3fd14983); ?>
<?php endif; ?>
        </div>
        <div class="col-12">
            <div class="bet-chart-heading-area d-flex justify-content-between align-items-center">
                <h5><?php echo app('translator')->get('Bet Chart'); ?></h5>
                <input class="form-control w-auto bg-white" name="date" type="text" value="<?php echo e(request()->date); ?>" autocomplete="off" placeholder="<?php echo app('translator')->get('Start Date - End Date'); ?>">
            </div>
            <div class="card custom--card">
                <div class="card-body">
                    <div id="betChart"></div>
                </div>
            </div>
        </div>

        <div class="col-12">
            <h5 class="mb-2 mt-2">
                <?php echo app('translator')->get('Latest Transaction History'); ?>
            </h5>
            <?php echo $__env->make($activeTemplate . 'partials.transaction_table', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        </div>
    </div>

    <?php if($user->kv == Status::KYC_UNVERIFIED && $user->kyc_rejection_reason): ?>
        <div class="modal fade" id="kycRejectionReason">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title"><?php echo app('translator')->get('KYC Document Rejection Reason'); ?></h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <p><?php echo e($user->kyc_rejection_reason); ?></p>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('style-lib'); ?>
    <link href="<?php echo e(asset('assets/global/css/daterangepicker.css')); ?>" rel="stylesheet">
<?php $__env->stopPush(); ?>

<?php $__env->startPush('script-lib'); ?>
    <script src="<?php echo e(asset('assets/global/js/apexcharts.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/global/js/moment.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/global/js/daterangepicker.min.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('script'); ?>
    <script>
        (function($) {
            "use strict";

            $('.copyBtn').on('click', function() {
                var copyText = document.getElementById("textToCopy");
                copyText.select();
                copyText.setSelectionRange(0, 99999);
                document.execCommand("copy");
                iziToast.success({
                    message: "Copied: " + copyText.value,
                    position: "topRight"
                });
            });

            var startsOne;
            var endOne;
            let startDate;
            let endDate;

            <?php if(@$request->starts_from_start): ?>
                startsOne = moment(`<?php echo e(@$request->startDate); ?>`);
            <?php endif; ?>

            <?php if(@$request->starts_from_end): ?>
                endOne = moment(`<?php echo e(@$request->endDate); ?>`);
            <?php endif; ?>


            function intDateRangePicker(element, start, end) {
                $(element).daterangepicker({
                    startDate: start,
                    endDate: end,
                    ranges: {
                        'Clear': ['', ''],
                        'Today': [moment(), moment()],
                        'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                        'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                        'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                        'This Month': [moment().startOf('month'), moment().endOf('month')],
                        'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
                    }
                });

                $(element).on('apply.daterangepicker', function(ev, picker) {
                    if (!(picker.startDate.isValid() && picker.endDate.isValid())) {
                        $(element).val('');
                    }
                    window.location = appendQueryParameter('date', this.value);
                });
            }

            intDateRangePicker('[name=date]', startsOne, endOne);

            var betOptions = {
                series: [{
                    name: 'Total Stake',
                    data: [
                        <?php $__currentLoopData = $report['bet_stake_amount']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stakeAmount): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            "<?php echo e($stakeAmount); ?>",
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    ]
                }, {
                    name: 'Total Return',
                    data: [
                        <?php $__currentLoopData = $report['bet_return_amount']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $returnAmount): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            "<?php echo e($returnAmount); ?>",
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    ]
                }],
                chart: {
                    type: 'bar',
                    height: 350,
                    toolbar: {
                        show: true,
                        tools: {
                            download: false
                        }
                    }
                },
                grid: {
                    xaxis: {
                        lines: {
                            show: false
                        }
                    },
                    yaxis: {
                        lines: {
                            show: false
                        }
                    },
                },
                plotOptions: {
                    bar: {
                        horizontal: false,
                        columnWidth: '55%',
                        endingShape: 'rounded'
                    },
                },
                dataLabels: {
                    enabled: false
                },
                stroke: {
                    show: true,
                    width: 2,
                    colors: ['transparent']
                },
                xaxis: {
                    categories: [
                        <?php $__currentLoopData = $report['bet_dates']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            "<?php echo e($date); ?>",
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    ],
                },
                fill: {
                    opacity: 1
                },
                tooltip: {
                    y: {
                        formatter: function(val) {
                            return `${val} <?php echo e(gs('cur_text')); ?>`
                        }
                    }
                },
            };
            var chart = new ApexCharts(document.querySelector("#betChart"), betOptions);
            chart.render();
        })(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/cuce22pe/public_html/bet.newgenguru.com/core/resources/views/templates/basic/user/dashboard.blade.php ENDPATH**/ ?>