<?php

declare(strict_types=1);

namespace App\Support;

use App\Services\ContentSanitizer;

final class ArtworkDescriptionContentValidator
{
    /**
     * @return list<string>
     */
    public static function errors(null|string $value): array
    {
        $normalized = trim((string) ($value ?? ''));

        if ($normalized === '') {
            return [];
        }

        return ContentSanitizer::validate($normalized);
    }
}