<?php

namespace App\Support\Simulation;

final class SimulationReportReconciliationExpectations
{
    public const AS_OF_DATE = '2026-08-15';
    public const PERIOD_FROM = '2026-06-01';
    public const PERIOD_TO = '2026-08-15';
    public const ALL_TIME_FROM = '1900-01-01';

    /** @return array<string, string|int> */
    public static function financialControls(): array
    {
        return [
            'account_balance' => '223772000.00',
            'cash_balance' => '55647000.00',
            'bank_balance' => '136055000.00',
            'mobile_money_balance' => '23070000.00',
            'other_account_balance' => '9000000.00',
            'collections' => '2152000.00',
            'disbursements' => '8245000.00',
            'approved_expenses' => '300000.00',
            'payroll' => '1200000.00',
            'capital' => '234000000.00',
            'opening_funds' => '229000000.00',
            'capital_injections' => '5000000.00',
            'all_time_money_in' => '238167000.00',
            'all_time_money_out' => '14395000.00',
            'all_time_net_cash_flow' => '223772000.00',
            'cash_flow_operating_out' => '1500000.00',
            'cash_flow_loan_disbursements_out' => '8245000.00',
            'cash_flow_net_transfers' => '0.00',
        ];
    }

    /** @return array<string, string|int> */
    public static function profitLossControls(): array
    {
        return [
            'interest_income' => '388000.00',
            'fee_income' => '134666.68',
            'penalty_income' => '0.00',
            'write_off_recovery_income' => '200000.00',
            'total_income' => '722666.68',
            'operating_expenses' => '300000.00',
            'payroll_expense' => '1200000.00',
            'write_off_expense' => '600000.00',
            'depreciation_expense' => '0.00',
            'asset_maintenance_expense' => '150000.00',
            'settlement_adjustment_expense' => '30000.00',
            'total_expenses' => '2280000.00',
            'net_profit' => '-1557333.32',
            'month_net_profit' => '-1671333.32',
            'statement_assets' => '232442666.68',
            'statement_equity' => '232442666.68',
        ];
    }

    /** @return array<string, string|int> */
    public static function portfolioControls(): array
    {
        return [
            'active_loans' => 7,
            'original_principal' => '6500000.00',
            'principal_outstanding' => '6170666.68',
            'interest_outstanding' => '683000.00',
            'fees_outstanding' => '181333.32',
            'penalties_outstanding' => '10000.00',
            'total_outstanding' => '7045000.00',
            'overdue_loans' => 1,
            'overdue_principal' => '500000.00',
            'overdue_interest' => '75000.00',
            'overdue_total' => '585000.00',
            'portfolio_at_risk_percent' => '8.10',
            'completed_loans' => 2,
            'written_off_loans' => 1,
            'recoverable_balance' => '499000.00',
        ];
    }

    /** @return array<string, array<string, string|int>> */
    public static function branchControls(): array
    {
        return [
            'SIM-DAR' => [
                'active_loans' => 3,
                'principal_outstanding' => '3598333.34',
                'total_outstanding' => '4091000.00',
                'overdue_total' => '585000.00',
                'collections' => '600000.00',
                'cash_disbursements' => '4345000.00',
            ],
            'SIM-MZA' => [
                'active_loans' => 3,
                'principal_outstanding' => '2172333.34',
                'total_outstanding' => '2483000.00',
                'overdue_total' => '0.00',
                'collections' => '769000.00',
                'cash_disbursements' => '2800000.00',
            ],
            'SIM-ARU' => [
                'active_loans' => 1,
                'principal_outstanding' => '400000.00',
                'total_outstanding' => '471000.00',
                'overdue_total' => '0.00',
                'collections' => '783000.00',
                'cash_disbursements' => '1100000.00',
            ],
        ];
    }

    /** @return array<string, string|int> */
    public static function fixedAssetControls(): array
    {
        return [
            'asset_count' => 1,
            'total_cost' => '2500000.00',
            'accumulated_depreciation' => '100000.00',
            'net_book_value' => '2400000.00',
            'period_depreciation' => '100000.00',
            'period_maintenance' => '150000.00',
        ];
    }
}
