<?php

namespace NoahVet\Reef\Factory\Jane;

class EndpointFactory implements EndpointFactoryInterface
{
    /**
     * @template TEndpoint of object
     *
     * @param class-string<TEndpoint> $endpointClass
     * @param array<string, mixed>    $queryParams
     *
     * @return TEndpoint
     */
    #[\Override]
    public function create(string $endpointClass, array $queryParams): object
    {
        return new $endpointClass($queryParams);
    }
}
