@extends('layouts.admin')

@section('content')
<!-- content @s -->
                <div class="nk-content nk-content-fluid">
                    <div class="container-xl wide-lg">
                        <div class="nk-content-body">
                            <div class="nk-block-head nk-block-head-sm">
                                <div class="nk-block-between">
                                    <div class="nk-block-head-content">
                                        <h3 class="nk-block-title page-title">Dashboard Overview</h3>
                                        <div class="nk-block-des text-soft">
                                            <p>Welcome to  Back {{ Auth::user()->name }}.</p>
                                        </div>
                                    </div><!-- .nk-block-head-content -->
                                    <div class="nk-block-head-content">
                                        <div class="toggle-wrap nk-block-tools-toggle">
                                            <a href="#" class="btn btn-icon btn-trigger toggle-expand me-n1" data-target="pageMenu"><em class="icon ni ni-more-v"></em></a>
                                           
                                        </div>
                                    </div><!-- .nk-block-head-content -->
                                </div><!-- .nk-block-between -->
                            </div><!-- .nk-block-head -->
                            <div class="nk-block">
                                <div class="row g-gs">
                                    <div class="col-xxl-12">
                                        <div class="row g-gs">
                                             
                                            <div class="col-lg-5 col-xxl-12">
                                                <div class="row g-gs">
                                                    <div class="col-sm-6 col-lg-12 col-xxl-6">
                                                        <div class="card card-bordered">
                                                            <div class="card-inner">
                                                                <div class="card-title-group align-start mb-2">
                                                                    <div class="card-title">
                                                                        <h6 class="title">Active Users</h6>
                                                                    </div>
                                                                    <div class="card-tools">
                                                                        <em class="card-hint icon ni ni-help-fill" data-bs-toggle="tooltip" data-bs-placement="left" title="Total active Users"></em>
                                                                    </div>
                                                                </div>
                                                                <div class="align-end flex-sm-wrap g-4 flex-md-nowrap">
                                                                    <div class="nk-sale-data">
                                                                        <span class="amount">{{ $totalUsers }}</span>
                                                                        <span class="sub-title"><span class="change down text-danger"><em class="icon ni ni-arrow-long-down"></em>1.93%</span>since last month</span>
                                                                    </div>
                                                                    <div class="nk-sales-ck">
                                                                        <canvas class="sales-bar-chart" id="activeSubscription"></canvas>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div><!-- .card -->
                                                    </div><!-- .col -->
                                                    <div class="col-sm-6 col-lg-12 col-xxl-6">
                                                        <div class="card card-bordered">
                                                            <div class="card-inner">
                                                                <div class="card-title-group align-start mb-2">
                                                                    <div class="card-title">
                                                                        <h6 class="title">Total Wallets</h6>
                                                                    </div>
                                                                    <div class="card-tools">
                                                                        <em class="card-hint icon ni ni-help-fill" data-bs-toggle="tooltip" data-bs-placement="left" title="Total Wallets"></em>
                                                                    </div>
                                                                </div>
                                                                <div class="align-end flex-sm-wrap g-4 flex-md-nowrap">
                                                                    <div class="nk-sale-data">
                                                                        <span class="amount">{{ $totalWallets }}</span>
                                                                        <span class="sub-title"><span class="change up text-success"><em class="icon ni ni-arrow-long-up"></em>2.45%</span>since last week</span>
                                                                    </div>
                                                                    <div class="nk-sales-ck">
                                                                        <canvas class="sales-bar-chart" id="totalSubscription"></canvas>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div><!-- .card -->
                                                    </div><!-- .col -->
                                                    <div class="col-sm-6 col-lg-12 col-xxl-6">
                                                        <div class="card card-bordered">
                                                            <div class="card-inner">
                                                                <div class="card-title-group align-start mb-2">
                                                                    <div class="card-title">
                                                                        <h6 class="title">Total Users Balance</h6>
                                                                    </div>
                                                                    <div class="card-tools">
                                                                        <em class="card-hint icon ni ni-help-fill" data-bs-toggle="tooltip" data-bs-placement="left" title="Total Users Balance"></em>
                                                                    </div>
                                                                </div>
                                                                <div class="align-end flex-sm-wrap g-4 flex-md-nowrap">
                                                                    <div class="nk-sale-data">
                                                                        <span class="amount">${{ number_format($totalBalance, 2) }}</span>
                                                                        <span class="sub-title"><span class="change up text-success"><em class="icon ni ni-arrow-long-up"></em>2.45%</span>since last week</span>
                                                                    </div>
                                                                    <div class="nk-sales-ck">
                                                                        <canvas class="sales-bar-chart" id="totalSubscription"></canvas>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div><!-- .card -->
                                                    </div><!-- .col -->
                                                    
                                                    
                                                </div><!-- .row -->
                                            </div><!-- .col -->
                                        </div><!-- .row -->
                                    </div><!-- .col -->
                                     
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                </div><!-- .row -->
                            </div><!-- .nk-block -->
                        </div>
                    </div>
                </div>
                <!-- content @e -->
@endsection
