<?php

declare(strict_types=1);

use App\Controllers\AdminController;
use App\Controllers\ApiController;
use App\Controllers\AssistantController;
use App\Controllers\AuthController;
use App\Controllers\DashboardController;
use App\Controllers\DocumentController;
use App\Controllers\HandbookController;
use App\Controllers\HomeController;
use App\Controllers\InstitutionController;
use App\Controllers\MapController;
use App\Controllers\PetitionController;
use App\Controllers\ProfileController;
use App\Controllers\QrController;
use App\Controllers\ReportController;
use App\Controllers\StatisticsController;
use App\Controllers\TrackingController;
use App\Controllers\TransparencyController;
use App\Controllers\ZdoiController;
use App\Core\Router;

$router = new Router();

$router->get('/', [HomeController::class, 'index']);
$router->get('/dashboard', [DashboardController::class, 'index']);

$router->get('/reports/new', [ReportController::class, 'create']);
$router->post('/reports', [ReportController::class, 'store']);

$router->get('/assistant', [AssistantController::class, 'index']);
$router->get('/zdoi', [ZdoiController::class, 'create']);
$router->post('/zdoi', [ZdoiController::class, 'store']);

$router->get('/petitions', [PetitionController::class, 'index']);
$router->post('/petitions', [PetitionController::class, 'store']);

$router->get('/institutions', [InstitutionController::class, 'index']);
$router->get('/map', [MapController::class, 'index']);
$router->get('/tracking', [TrackingController::class, 'index']);
$router->post('/tracking', [TrackingController::class, 'show']);
$router->get('/handbook', [HandbookController::class, 'index']);
$router->get('/generators', [DocumentController::class, 'index']);
$router->post('/generators/preview', [DocumentController::class, 'preview']);
$router->get('/qr-library', [QrController::class, 'index']);
$router->get('/statistics', [StatisticsController::class, 'index']);
$router->get('/transparency', [TransparencyController::class, 'index']);
$router->get('/admin', [AdminController::class, 'index']);

$router->get('/login', [AuthController::class, 'login']);
$router->post('/login', [AuthController::class, 'authenticate']);
$router->get('/register', [AuthController::class, 'register']);
$router->post('/register', [AuthController::class, 'store']);
$router->get('/forgot-password', [AuthController::class, 'forgotPassword']);
$router->get('/verify-email', [AuthController::class, 'verifyEmail']);
$router->get('/profile', [ProfileController::class, 'index']);

$router->get('/api/map', [ApiController::class, 'map']);
$router->get('/api/statistics', [ApiController::class, 'statistics']);
$router->get('/api/institutions', [ApiController::class, 'institutions']);
$router->post('/api/assistant/suggest', [ApiController::class, 'assistant']);

return $router;
