@extends('layouts.admin')

@section('content')
  <div class="card-header">
    <h4>Accepted Withdraw Requests</h4>
  </div>

  <div class="card-body">
    @include('admin.partials.flash-messages')

    <div class="portal-page-shell">
      <div class="portal-hero-card">
        <div class="portal-hero-main">
          <div class="portal-hero-copy">
            <h5>Accepted Withdraw Requests</h5>
            <p>View approved payouts and reverse them when a completed request needs to be cancelled after approval.</p>
            <div class="portal-chip-list">
              <span class="portal-chip">{{ $wallethistory->count() }} Accepted</span>
              <span class="portal-chip">Payout Approved</span>
              <span class="portal-chip">Reversal Available</span>
            </div>
            <div class="portal-hero-actions">
              <a href="{{ route('admin.withdrawrequest') }}" class="btn btn-outline-primary btn-sm">Pending Withdraw</a>
              <a href="{{ route('admin.rejectwithdraw') }}" class="btn btn-outline-danger btn-sm">Declined Withdraw</a>
            </div>
          </div>
        </div>
      </div>

      <div class="portal-form-shell">
        @include('admin.wallets.partials.withdraw-table', [
          'records' => $wallethistory,
          'viewMode' => 'accepted',
        ])
      </div>
    </div>
  </div>
@endsection
