<?php

namespace App\Domain\Scraping\Domain\Model\ValueObject;

readonly class DownloadResult
{
    public function __construct(
        private string $localPath,
        private string $originalUrl
    ) {
        if (empty($localPath)) {
            throw new \InvalidArgumentException('Local path cannot be empty');
        }

        if (!filter_var($originalUrl, FILTER_VALIDATE_URL)) {
            throw new \InvalidArgumentException('Invalid original URL provided');
        }
    }

    public function getLocalPath(): string
    {
        return $this->localPath;
    }

    public function getOriginalUrl(): string
    {
        return $this->originalUrl;
    }
}
