@extends('Admin.admin_dashboard_links')
@section('content')
<div id="main-wrapper">

    <!--**********************************
Nav header start
***********************************-->
<div class="nav-header">
    <a href="index.html" class="brand-logo" aria-label="Gymove">
        <img class="brand-title" src="https://i.ibb.co/GvQRQF4/final-e1701807626614.png" alt="">
    </a>


<div class="nav-control">
    <div class="hamburger">
        <span class="line"></span><span class="line"></span><span class="line"></span>
    </div>
</div>
</div>

<header class="header">
<div class="header-content">
    <nav class="navbar navbar-expand">
        <div class="collapse navbar-collapse justify-content-between">
            <div class="header-left">
                <div class="dashboard_bar">
                Dashboard					</div>
            </div>
            <ul class="navbar-nav header-right">
                
                
                <li class="nav-item dropdown notification_dropdown">
                    
                   
                </li>
               
                
                <li class="nav-item dropdown header-profile">
                    <a class="nav-link" href="javascript:void(0)" role="button" data-bs-toggle="dropdown">
                     
                        <div class="header-info">
                            <span class="text-black"><strong>
                            @if(Auth::guard('admin_login'))
                            {{Auth::guard('admin_login')->user()->email}}
                         @endif    
                            </strong></span>
                        
                        </div>
                    </a>
                    <div class="dropdown-menu dropdown-menu-end">
                       
                        <a href="{{route('admin.logout')}}" class="dropdown-item ai-icon">
                            <svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" class="text-danger" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
                            <span class="ms-2">Logout </span>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
    </nav>
</div>
</header>

@include('Admin.admin_dashboard_sidebar')

<div class="content-body default-height">
<!-- row -->
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-6">
            <div class="card">
                <div class="card-header bg-primary">
                    <h3 class="text-white">User</h3>
                </div>
                <div class="card-body">
                    <h5>User Name: {{$user->name  }} </h5>
                    <h5>User Refer Id: {{$user->Refer_id  }} </h5>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="card">
                <form action="{{route('send.money_by_admin',$user->id)}}" method="POST">
                    @csrf
                    <div class="card-header bg-primary">
                        <h3 class="text-white">Send Money</h3>
                    </div>
                    <div class="card-body">
                        <div class="mb-3">
                            <label for="" class="form-label">Enter Ammount</label>
                            <input type="number" class="form-control" name="ammount">
                        </div>
                        <div class="mb-3">
                            <button class="btn btn-primary">Submit</button>
                        </div>
                    </div>
                </form>
               
            </div>
        </div>
    </div>
   
   <div class="row">

 
     
            <div class="col-sm-3">
                <div class="card avtivity-card" style="cursor:pointer;">
                    <div class="card-body">
                        <div class="media align-items-center">
                            {{-- <span class="activity-icon bgl-success me-md-4 me-3">
                                <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <g clip-path="url(#clip2)">
                                    <path d="M14.6406 24.384C14.4639 24.1871 14.421 23.904 14.5305 23.6633C15.9635 20.513 14.4092 18.7501 14.564 11.6323C14.5713 11.2944 14.8346 10.9721 15.2564 10.9801C15.6201 10.987 15.905 11.2962 15.8971 11.6598C15.8902 11.9762 15.8871 12.2939 15.8875 12.6123C15.888 12.9813 16.1893 13.2826 16.5583 13.2776C17.6426 13.2628 19.752 12.9057 20.5684 10.4567L20.9744 9.23876C21.7257 6.9847 20.4421 4.55115 18.1335 3.91572L13.9816 2.77294C12.3274 2.31768 10.5363 2.94145 9.52387 4.32498C4.66826 10.9599 1.44452 18.5903 0.0754914 26.6727C-0.300767 28.8937 0.754757 31.1346 2.70222 32.2488C13.6368 38.5051 26.6023 39.1113 38.35 33.6379C39.3524 33.1709 40.0002 32.1534 40.0002 31.0457V19.1321C40.0002 18.182 39.5322 17.2976 38.7484 16.7664C34.5339 13.91 29.1672 14.2521 25.5723 18.0448C25.2519 18.3828 25.3733 18.937 25.8031 19.1166C27.4271 19.7957 28.9625 20.7823 30.2439 21.9475C30.5225 22.2008 30.542 22.6396 30.2654 22.9155C30.0143 23.1658 29.6117 23.1752 29.3485 22.9376C25.9907 19.9053 21.4511 18.5257 16.935 19.9686C16.658 20.0571 16.4725 20.3193 16.477 20.61C16.496 21.8194 16.294 22.9905 15.7421 24.2172C15.5453 24.6544 14.9607 24.7409 14.6406 24.384Z" fill="#27BC48"/>
                                    </g>
                                    <defs>
                                    <clipPath id="clip2">
                                    <rect width="40" height="40" fill="white"/>
                                    </clipPath>
                                    </defs>
                                </svg>
                            </span> --}}
                            <a href="{{route('daily.profit',$id)}}">
                            <div class="media-body">
                               
                                <p class="fs-14 mb-2">Accepted Packages Withdraw</p>
                                <span class="title text-black font-w600">
                                    @if(isset($accepted_packages))
                                    {{count($accepted_packages)}}
                               
                                    @else
                                    0
                                    @endif
                                </span>
                        
                            </div>
                        </a>
                        </div>
                        {{-- <div class="progress" style="height:5px;">
                            <div class="progress-bar bg-success" style="width: 42%; height:5px;" aria-label="Progess-success" role="progressbar">
                                <span class="sr-only">100% Complete</span>
                            </div>
                        </div> --}}
                    </div>
                    <div class="effect bg-success"></div>
                </div>
            </div>

    <div class="col-sm-3">
        <a href="{{route('daily.profit',$id)}}">
        <div class="card avtivity-card" style="cursor:pointer;">
            <div class="card-body">
                <div class="media align-items-center">
                    
                    <div class="media-body">
                        <p class="fs-14 mb-2">Total Package Buy</p>
                        <span class="title text-black font-w600">
                            @if(isset($buying_packages))
                            {{count($buying_packages)}}

                            @else
                            0
                            @endif
                        </span>
                    </div>
                </div>
                
            </div>
            <div class="effect bg-secondary"></div>
        </div>
    </a>
    </div>


    <div class="col-sm-3">
        <a href="{{route('daily.profit',$id)}}">
        <div class="card avtivity-card" style="cursor: pointer">
            <div class="card-body">
                <div class="media align-items-center">
                 
                    <div class="media-body">
                        <p class="fs-14 mb-2">Total Invested Money</p>
                        <span class="title text-black font-w600">{{($total)}} $</span>
                    </div>
                </div>
              
            </div>
            <div class="effect bg-warning"></div>
        </div>
    </a>
    </div>
    
<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total Withdraw </p>
                    <span class="title text-black font-w600">{{$total_withdraw}} $</span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-danger"></div>
    </div>
</div>

<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total Daily Profit </p>
                    <span class="title text-black font-w600">
                        @if(isset($u))
                        {{$u->total}} $
                        @else
                       0 $
                        @endif
                    </span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-primary"></div>
    </div>
</div>
<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total Referred People </p>
                    <span class="title text-black font-w600">
                        @if(isset($reference_balance))
                        {{count($reference_balance)}} Persons
                        @else
                        0 persons
                        @endif
                    </span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-info"></div>
    </div>
</div>
<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total Reference Balance </p>
                    <span class="title text-black font-w600">
                        @if(isset($total_refer_blnce))
                        {{($total_refer_blnce)}} $
                        @else
                        0 $
                        @endif
                    </span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-success"></div>
    </div>
</div>
<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total First Level </p>
                    <span class="title text-black font-w600">
                        @if(isset($first_check))
                        {{($first_check->total)}} $
                        @else
                        0 $
                        @endif
                    </span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-primary"></div>
    </div>
</div>
<div class="col-sm-3">
    <div class="card avtivity-card" style="cursor: pointer;">
        <div class="card-body">
            <div class="media align-items-center">
                
                <div class="media-body">
                    <p class="fs-14 mb-2">Total Second Level  </p>
                    <span class="title text-black font-w600">
                        @if(isset($total_second_level))
                        {{($total_second_level)}} $
                        @else
                        0 $
                        @endif
                    </span>
                </div>
            </div>
            
        </div>
        <div class="effect bg-danger"></div>
    </div>
</div>






  

 
    
   

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


<footer class="footer">
<div class="copyright">
    <p>Designed &amp; Developed by <a href="https://softtech.com.bd/" target="_blank">SOFTTECH</a>
        2023</p>
</div>
</footer>
<!--**********************************
Footer end
***********************************-->        
{{-- <script>
    Swal.fire({
   title: "Good job!",
   text: "You clicked the button!",
   icon: "success"
 });
 </script> --}}
</div>

@endsection