<?php

declare(strict_types=1);

namespace App\Application\LiveComponents\Services;

use App\Application\LiveComponents\ValueObjects\ScrollItem;

/**
 * ScrollDataProvider - Interface for loading infinite scroll data
 */
interface ScrollDataProvider
{
    /**
     * Get items for a specific page
     *
     * @param int $page Current page number (1-based)
     * @param int $pageSize Number of items per page
     * @return array<ScrollItem>
     */
    public function getItems(int $page, int $pageSize): array;

    /**
     * Get total number of available items
     *
     * @return int Total items count
     */
    public function getTotalCount(): int;

    /**
     * Check if more items are available
     *
     * @param int $currentPage Current page
     * @param int $pageSize Items per page
     * @return bool True if more items available
     */
    public function hasMore(int $currentPage, int $pageSize): bool;
}
