<?php

namespace KupShop\AutomationConfiguratorBundle\Configurator\Interfaces\Context;

use KupShop\AutomationConfiguratorBundle\Configurator\Interfaces\Config\ConfiguratorObject;
use KupShop\AutomationConfiguratorBundle\Exceptions\FetchResultTooLarge;

interface AutomationContextProvider
{
    public static function getContextName();

    public static function getContextTitle();

    public function createRawContext();

    /**
     * @throws FetchResultTooLarge
     */
    public function fetchContext($context, ?int $limit = null): array;

    public function getTestAutocompleteData(string $searchValue);

    public function restrictTestContext($context, array $values);

    public function addExecutionHistory(ConfiguratorObject $configuration, $context);

    public function filterNotExecuted(ConfiguratorObject $configuration, $context);

    public function getMaxFilteredObjectsLimit(): int;

    public function getDbFetchLimit(): int;
}
