@extends('layout.main')
@section('content')
<div class="container-xxl flex-grow-1 container-p-y">
    <div class="row g-6 mb-6">
    <div class="col-sm-6 col-xl-3">
        <div class="card">
        <div class="card-body">
            <div class="d-flex align-items-start justify-content-between">
            <div class="content-left">
                <span class="text-heading">Session</span>
                <div class="d-flex align-items-center my-1">
                <h4 class="mb-0 me-2">21,459</h4>
                <p class="text-success mb-0">(+29%)</p>
                </div>
                <small class="mb-0">Total Users</small>
            </div>
            <div class="avatar">
                <span class="avatar-initial rounded bg-label-primary">
                <i class="icon-base ti tabler-users icon-26px"></i>
                </span>
            </div>
            </div>
        </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
        <div class="card-body">
            <div class="d-flex align-items-start justify-content-between">
            <div class="content-left">
                <span class="text-heading">Paid Users</span>
                <div class="d-flex align-items-center my-1">
                <h4 class="mb-0 me-2">4,567</h4>
                <p class="text-success mb-0">(+18%)</p>
                </div>
                <small class="mb-0">Last week analytics </small>
            </div>
            <div class="avatar">
                <span class="avatar-initial rounded bg-label-danger">
                <i class="icon-base ti tabler-user-plus icon-26px"></i>
                </span>
            </div>
            </div>
        </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
        <div class="card-body">
            <div class="d-flex align-items-start justify-content-between">
            <div class="content-left">
                <span class="text-heading">Active Users</span>
                <div class="d-flex align-items-center my-1">
                <h4 class="mb-0 me-2">{{ number_format($totalUsers) }}</h4>
                </div>
                <small class="mb-0">Last week analytics</small>
            </div>
            <div class="avatar">
                <span class="avatar-initial rounded bg-label-success">
                <i class="icon-base ti tabler-user-check icon-26px"></i>
                </span>
            </div>
            </div>
        </div>
        </div>
    </div>
    <div class="col-sm-6 col-xl-3">
        <div class="card">
        <div class="card-body">
            <div class="d-flex align-items-start justify-content-between">
            <div class="content-left">
                <span class="text-heading">Pending Users</span>
                <div class="d-flex align-items-center my-1">
                <h4 class="mb-0 me-2">1,234</h4>
                <p class="text-success mb-0">(+42%)</p>
                </div>
                <small class="mb-0">Last week analytics</small>
            </div>
            <div class="avatar">
                <span class="avatar-initial rounded bg-label-warning">
                <i class="icon-base ti tabler-user-search icon-26px"></i>
                </span>
            </div>
            </div>
        </div>
        </div>
    </div>
    </div>
    <div class="card">
    <div class="card-header border-bottom">
        <h5 class="card-title mb-0">Filters</h5>
        <div class="d-flex justify-content-between align-items-center row pt-4 gap-4 gap-md-0">
        <div class="col-md-4 user_role"></div>
        <div class="col-md-4 user_plan"></div>
        <div class="col-md-4 user_status"></div>
        </div>
    </div>
    <div class="card-datatable">
        <table class="datatables-users table">
            <thead class="border-top">
                <tr>
                <th></th> <th>ID</th>
                <th>User</th>
                <th>Role</th>
                <th>Status</th>
                <th>Actions</th>
                </tr>
            </thead>
        </table>
    </div>
    @include('users.user.add')
</div>
@endsection

@push('scripts')
<script>var userListingUrl = "{{ route('api.users.list') }}";</script>
<script src="{{ asset('assets/js/app-user-list.js') }}"></script>
@endpush