<?php

declare(strict_types=1);

namespace App\Support\Baselines;

enum BaselineCaptureMode: string
{
    case MetaOnly = 'meta_only';
    case Opportunistic = 'opportunistic';
    case FullContent = 'full_content';

    public function label(): string
    {
        return match ($this) {
            self::MetaOnly => 'Meta only',
            self::Opportunistic => 'Opportunistic',
            self::FullContent => 'Full content',
        };
    }

    /**
     * @return array<string, string>
     */
    public static function selectOptions(): array
    {
        $options = [];

        foreach (self::cases() as $case) {
            $options[$case->value] = $case->label();
        }

        return $options;
    }
}
