<?php

declare(strict_types=1);

namespace ApiModel\Route;

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

final class CertificadoTipoRoutes
{
    public static function register(RouteCollectorProxy $g, CertificadoTipoAction $action): void
    {
        $g->get('/certificado-tipos', fn (ServerRequestInterface $request, ResponseInterface $response) => HttpRunner::runJson($request, $response, fn () => $action->listar($request)));
    }
}
