<?php $__env->startSection('content'); ?>
    <body class="fix-header fix-sidebar card-no-border">

    <div id="main-wrapper">
        <div class="page-wrapper customWrap">

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card privacy-policy">
                            <div class="card-header">Friend Requests</div>
                            <div class="crdBody main-frndpg">
                                <?php if($friendRequests->isEmpty()): ?>
                                    <p>No Friends Request<p>
                                <?php else: ?>
                                    <?php $__currentLoopData = $friendRequests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $friendRequest): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                        <?php if( $friendRequest->sender != null): ?>

                                            <div class="row">
                                                <div class="col-md-6 col-lg-6">
                                                    <div class="">
                                                        <div class="row frnd-box">
                                                            <div class="col-md-8 col-lg-8">
                                                                <div class="frnd-img">
                                                                    <img
                                                                        src="<?php echo e($friendRequest->profile_image ? asset('profile_image/'.$friendRequest->profile_image) : asset('profile_image/user.png')); ?>"
                                                                        width="70" class="img-fluid" alt="img">
                                                                    <div class="frnd-txt">
                                                                        <h2><?php echo e($friendRequest->sender->name ?? ''); ?></h2>
                                                                        <h3><span
                                                                                style="color: green;"><?php echo e($friendRequest->status ?? ''); ?></span>
                                                                        </h3>
                                                                        <h6><?php echo e($friendRequest->created_at->diffForHumans()); ?></h6>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div style="display: flex;">
                                                                <form
                                                                    action="<?php echo e(route('friend-request.confirm', $friendRequest->sender_id)); ?>"
                                                                    method="POST" style="margin-right: 10px;">
                                                                    <?php echo csrf_field(); ?>
                                                                    <button class="btn-primary" type="submit">Confirm
                                                                        Request
                                                                    </button>
                                                                </form>
                                                                <form
                                                                    action="<?php echo e(route('friend-request.cancel', $friendRequest->sender_id)); ?>"
                                                                    method="POST">
                                                                    <?php echo csrf_field(); ?>
                                                                    <button class="btn-danger" type="submit">Cancel
                                                                        Request
                                                                    </button>
                                                                </form>
                                                            </div>


                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                        <?php endif; ?>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.dashboard-app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/servicedemoweb/public_html/global-man-cave/resources/views/dashboard/confirm-friend-requests.blade.php ENDPATH**/ ?>