<?php

declare(strict_types=1);

namespace ApiModel\Action;

use ApiModel\Service\CertificadoTipoService;
use Psr\Http\Message\ServerRequestInterface;

final class CertificadoTipoAction
{
    public function __construct(private readonly CertificadoTipoService $service) {}

    /** @return list<array<string, mixed>> */
    public function listar(ServerRequestInterface $request): array
    {
        \ApiModel\Shared\Support\AuthContext::jwtUser($request);

        return $this->service->listTipos();
    }
}
