<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Services\Report\FinancialReportService;

class FinancialReportController extends Controller
{
    public function __construct(private readonly FinancialReportService $financialReportService)
    {
    }

    public function incomeStatement(Request $request)
    {
        $report = $this->financialReportService->incomeStatement($request);

        return view('admin-views.report.income-statement', $report);
    }

    public function productProfitLoss(Request $request)
    {
        $report = $this->financialReportService->productProfitLoss($request);

        return view('admin-views.report.product-profit-loss', $report);
    }

    public function trialBalance(Request $request)
    {
        $report = $this->financialReportService->trialBalance($request);

        return view('admin-views.report.trial-balance', $report);
    }

    public function balanceSheet(Request $request)
    {
        $report = $this->financialReportService->balanceSheet($request);

        return view('admin-views.report.balance-sheet', $report);
    }
}
