<?php

declare(strict_types=1);

namespace App\Modules\Finance\Application\Services;

final class FinanceRouteContext
{
    public function cashboxesPath(): string { return '/finance/cashboxes'; }
    public function cashboxFormPath(int $id = 0): string { $base = '/finance/cashboxes/form'; return $id>0 ? $base.'?id='.$id : $base; }
    public function cashboxLedgerPath(): string { return '/finance/cashboxes/ledger'; }
    public function cashboxTxnPath(): string { return '/finance/cashboxes/txn-form'; }

    public function bankAccountsPath(): string { return '/finance/bank-accounts'; }
    public function bankAccountFormPath(int $id = 0): string { $base = '/finance/bank-accounts/form'; return $id>0 ? $base.'?id='.$id : $base; }
    public function bankBalancesPath(): string { return '/reports/finance/bank-balances'; }

    public function cashPaymentsPath(): string { return '/finance/cash-payments'; }
    public function cashPaymentFormPath(): string { return '/finance/cash-payments/form'; }
    public function cashPaymentViewPath(int $id = 0): string { $base = '/finance/cash-payments/view'; return $id>0 ? $base.'?id='.$id : $base; }
    public function cashPaymentCancelPath(int $id = 0): string { $base = '/finance/cash-payments/cancel'; return $id>0 ? $base.'?id='.$id : $base; }

    public function bankTransactionsPath(): string { return '/finance/bank-transactions'; }
    public function bankTransactionFormPath(): string { return '/finance/bank-transactions/form'; }
    public function bankStatementPath(): string { return '/reports/finance/bank-statement'; }

    public function checksPath(): string { return '/finance/checks'; }
    public function checkReceivePath(): string { return '/finance/checks/receive'; }
    public function checkViewPath(int $id = 0): string { $base = '/finance/checks/view'; return $id>0 ? $base.'?id='.$id : $base; }
    public function checkEndorsePath(int $id = 0): string { $base = '/finance/checks/endorse'; return $id>0 ? $base.'?id='.$id : $base; }
    public function checkReturnPath(int $id = 0): string { $base = '/finance/checks/return'; return $id>0 ? $base.'?id='.$id : $base; }
    public function checkReplacePath(int $id = 0): string { $base = '/finance/checks/replace'; return $id>0 ? $base.'?id='.$id : $base; }
    public function checkSettleCashPath(int $id = 0): string { $base = '/finance/checks/settle-cash'; return $id>0 ? $base.'?id='.$id : $base; }
    public function checkAlertsPath(): string { return '/finance/checks/alerts'; }

    public function dashboardCrumb(): array
    {
        return ['label' => 'لوحة التحكم', 'url' => '/admin/dashboard'];
    }
}
