<?php

namespace App\Tests\Domain\Manga\Adapter;

use App\Domain\Manga\Domain\Contract\Service\ImageProcessorInterface;

class InMemoryImageProcessor implements ImageProcessorInterface
{
    private const string FAKE_FULL_IMAGE_PATH = '/images/full/test-image.jpg';
    private const string FAKE_THUMBNAIL_PATH = '/images/thumbnails/test-image.jpg';

    /** @var array<string, string> */
    private array $downloadedImages = [];
    
    /** @var array<string, string> */
    private array $thumbnails = [];

    public function downloadImage(string $imageUrl): string
    {
        $this->downloadedImages[$imageUrl] = self::FAKE_FULL_IMAGE_PATH;
        return self::FAKE_FULL_IMAGE_PATH;
    }

    public function createThumbnail(string $originalImagePath): string
    {
        $this->thumbnails[$originalImagePath] = self::FAKE_THUMBNAIL_PATH;
        return self::FAKE_THUMBNAIL_PATH;
    }

    public function getDownloadedImages(): array
    {
        return $this->downloadedImages;
    }

    public function getThumbnails(): array
    {
        return $this->thumbnails;
    }
} 