<?php

declare(strict_types=1);

namespace apexl\Io\modules\mirror\Interface;

use Arrayy\Type\StringCollection;

interface UploaderServiceResolverInterface
{
    /**
     * Filter hook fired the first time an alias is resolved, with a
     * {@see StringCollection} mapping alias => uploader class-string.
     * Listeners register their driver's alias and return the collection.
     *
     * Mutate the supplied collection in place (e.g. `$aliases->set('s3', …)`)
     * — the resolver memoises that instance, so returning a new collection
     * resolves correctly but re-fires the chain on every subsequent call.
     *
     * Signature: `fn(StringCollection $aliases): StringCollection`
     */
    public const string HOOK__UPLOADER_SERVICE_ALIASES = 'uploaderServiceAliases';

    public function resolve(string $entityClass): ?UploaderServiceInterface;
}
