<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Marketing;

use CpCreation\VitiCore\Marketing\Model\ProductReview;
use CpCreation\VitiCore\Product\Model\Product;

interface PublishedProductReviewsProvider
{
    /** @return list<ProductReview> */
    public function findPublishedByProduct(
        Product $product,
        ?\DateTimeImmutable $now = null,
    ): array;

    /**
     * @param iterable<Product> $products
     *
     * @return list<ProductReview>
     */
    public function findPublishedByProducts(
        iterable $products,
        ?\DateTimeImmutable $now = null,
    ): array;
}
