<?php
declare(strict_types=1);

namespace Ekesto\CacheInvalidator\Core\Multilingual;

use Ekesto\CacheInvalidator\Core\Contracts\MultilingualProviderInterface;
use Ekesto\CacheInvalidator\Integrations\Multilingual\LanguageResolverInterface;

/**
 * Lite-safe default multilingual provider.
 *
 * A Lite build has no multilingual engine: no resolver is ever available and the
 * computed fanout mode is returned unchanged (no premium override). Generic
 * fanout math and URL expansion remain correct because they already collapse to
 * single-language / identity behavior when no resolver exists.
 */
final class NullMultilingualProvider implements MultilingualProviderInterface
{
    public function createResolver(): ?LanguageResolverInterface
    {
        return null;
    }

    public function filterFanoutMode(string $mode, array $context): string
    {
        return $mode;
    }
}
