@extends('layouts.admin')

@section('content')
<div class="row mb-3 g-3">

    {{-- MEMBERS REGISTERED --}}
    <div class="col-sm-6 col-md-4">
        <div class="card overflow-hidden" style="min-width: 12rem">
            <div class="bg-holder bg-card"
                 style="background-image:url({{ asset('admin/assets/img/icons/spot-illustrations/corner-1.png') }});">
            </div>
            <div class="card-body position-relative">
                <h6>Members Registered</h6>
                <div class="display-4 fs-4 mb-2 fw-normal font-sans-serif text-primary"
                     data-countup='{"endValue":{{ $membersCount }},"decimalPlaces":0}'>
                    0
                </div>
                <a class="fw-semi-bold fs--1 text-nowrap"
                   href="{{ url('/member') }}">
                    View members
                    <span class="fas fa-angle-right ms-1"></span>
                </a>
            </div>
        </div>
    </div>

    {{-- PAYMENTS TODAY --}}
    <div class="col-sm-6 col-md-4">
        <div class="card overflow-hidden" style="min-width: 12rem">
            <div class="bg-holder bg-card"
                 style="background-image:url({{ asset('admin/assets/img/icons/spot-illustrations/corner-2.png') }});">
            </div>
            <div class="card-body position-relative">
                <h6>Payments Collected Today</h6>
                <div class="display-4 fs-4 mb-2 fw-normal font-sans-serif text-success"
                     data-countup='{"endValue":{{ $todayCollected }},"decimalPlaces":2}'>
                    0
                </div>
                <a class="fw-semi-bold fs--1 text-nowrap"
                   href="{{ url('/allpayments') }}">
                    View payments
                    <span class="fas fa-angle-right ms-1"></span>
                </a>
            </div>
        </div>
    </div>

  

</div>

{{-- QUICK ACTIONS --}}
<div class="row g-3">

    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h6 class="mb-0">Quick Actions</h6>
            </div>
            <div class="card-body">
                <a href="{{ url('/member') }}" class="btn btn-primary me-2">
                    <i class="fas fa-user-plus me-1"></i> Register Member
                </a>               
            </div>
        </div>
    </div>

    {{-- AGENT INFO --}}
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h6 class="mb-0">My Profile</h6>
            </div>
            <div class="card-body">
                <p class="mb-1"><strong>Name:</strong> {{ auth()->user()->name }}</p>
                <p class="mb-1"><strong>Email:</strong> {{ auth()->user()->email }}</p>
                <p class="mb-0"><strong>Role:</strong> Agent</p>
            </div>
        </div>
    </div>

</div>
@endsection
