<?php
declare(strict_types=1);

namespace Ekesto\CacheInvalidator\Integrations\Builders\Adapters;

use Ekesto\CacheInvalidator\Integrations\Builders\BuilderInterface;

/**
 * Default Gutenberg fallback profile.
 */
final class GutenbergBuilder implements BuilderInterface
{
    /**
     * Return builder key.
     *
     * @return string
     */
    public function key(): string
    {
        return 'gutenberg';
    }

    /**
     * Detect fallback builder profile.
     *
     * @param \WP_Post $post Post object.
     * @return array{detected:bool,confidence:string,signals:string[]}
     */
    public function detect(\WP_Post $post): array
    {
        unset($post);

        return [
            'detected' => true,
            'confidence' => 'unknown',
            'signals' => ['fallback'],
        ];
    }

    /**
     * Return extra fields to scan.
     *
     * @return string[]
     */
    public function additionalFieldsToScan(): array
    {
        return [];
    }
}
