<?php

declare(strict_types=1);

namespace App\Modules\Ledger\Application;

class DashboardService
{
    public function summary(string $tenantId, string $memberId): array
    {
        $ledgerService = new LedgerService();
        $overview = $ledgerService->accountingOverview($tenantId, $memberId);
        $balance = (float) ($overview['summary']['balance'] ?? 0);

        return [
            'balance' => $balance,
            'coffee_strokes_this_month' => 5,
            'payments_this_month' => (int) ($overview['summary']['payments'] ?? 0),
            'latest_booking_at' => '2026-03-21 08:00:00',
            'corrections_this_month' => (int) ($overview['summary']['corrections'] ?? 0),
            'strikes_this_month' => (int) ($overview['summary']['strike_entries'] ?? 0),
        ];
    }
}
