<?php

namespace App\Http\Controllers\SuperAdmin;

use App\Enums\PaymentStatus;
use App\Http\Controllers\Controller;
use App\Services\SuperAdmin\PlatformAdminService;
use Illuminate\Http\Request;
use Illuminate\View\View;

class PaymentController extends Controller
{
    public function index(Request $request, PlatformAdminService $platform): View
    {
        return view('super-admin.payments.index', [
            'payments' => $platform->payments($request),
            'kpis' => $platform->paymentKpis(),
            'statuses' => PaymentStatus::options(),
            'filters' => $request->only(['q', 'status', 'method']),
        ]);
    }
}
