<?php

declare(strict_types=1);

namespace App\Controllers;

use App\Core\Controller;
use App\Repositories\StatisticsRepository;

final class StatisticsController extends Controller
{
    public function index(): string
    {
        $statistics = new StatisticsRepository();

        return $this->view('statistics/index', [
            'title' => 'Статистики',
            'overview' => $statistics->overview(),
            'municipalities' => $statistics->byMunicipality(),
            'categories' => $statistics->byCategory(),
            'transparency' => $statistics->transparency(),
        ]);
    }
}
