<?php

namespace App\Filament\Construction\Pages;

use App\Filament\Concerns\ProfitLossReportPage;
use App\Services\Dashboard\DashboardFilterBag;
use App\Services\Reports\ProfitLossReportService;

class ProfitLossReport extends ProfitLossReportPage
{
    protected static ?string $navigationIcon = 'heroicon-o-document-chart-bar';

    protected static function reportPermission(): string
    {
        return 'cn_view_finance';
    }

    protected static function buildReport(DashboardFilterBag $filters): array
    {
        return ProfitLossReportService::construction($filters);
    }
}
