<?php

declare(strict_types=1);

namespace ApiModel\Route;

use ApiModel\Action\ReporteCanjeAction;
use ApiModel\Shared\Support\HttpRunner;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Routing\RouteCollectorProxy;

final class ReporteCanjeRoutes
{
    public static function register(RouteCollectorProxy $g, ReporteCanjeAction $action): void
    {
        $g->get('/reportes/canjes', fn (ServerRequestInterface $request, ResponseInterface $response) => HttpRunner::runJson($request, $response, fn () => $action->obtenerResumen($request)));
    }
}
