<?php

namespace NoahVet\Reef\Infrastructure\Business\BSM;

use NoahVet\Reef\Bsm\Endpoint\GetAllPublisherUser;
use NoahVet\Reef\Bsm\Model\PublisherUserResponse;
use NoahVet\Reef\Infrastructure\Business\AbstractTeamMembersEnumerator;
use NoahVet\Reef\Iterator\Factory\ReefApiIteratorFactoryInterface;

/**
 * @extends AbstractTeamMembersEnumerator<PublisherUserResponse>
 */
class PublisherTeamMembersEnumerator extends AbstractTeamMembersEnumerator
{
    public function __construct(object $client, ReefApiIteratorFactoryInterface $iteratorFactory)
    {
        /* @phpstan-ignore method.notFound */
        $entityIdResolver = static fn (object $e): string => $e->getId();

        parent::__construct(
            $client,
            $iteratorFactory,
            GetAllPublisherUser::class,
            PublisherUserResponse::class,
            'publisherId',
            $entityIdResolver,
            static fn (PublisherUserResponse $u): string => $u->getPublisher()->getId(),
        );
    }

    #[\Override]
    protected function buildDateFilters(string $nowStr): array
    {
        return [];
    }
}
