<?php

declare(strict_types=1);

use App\Support\Badges\BadgeCatalog;
use App\Support\Badges\BadgeDomain;

it('maps finding severity values to canonical badge semantics', function (): void {
    $low = BadgeCatalog::spec(BadgeDomain::FindingSeverity, 'low');
    expect($low->label)->toBe('Low');
    expect($low->color)->toBe('gray');

    $medium = BadgeCatalog::spec(BadgeDomain::FindingSeverity, 'medium');
    expect($medium->label)->toBe('Medium');
    expect($medium->color)->toBe('warning');

    $high = BadgeCatalog::spec(BadgeDomain::FindingSeverity, 'high');
    expect($high->label)->toBe('High');
    expect($high->color)->toBe('danger');
});

it('maps finding status values to canonical badge semantics', function (): void {
    $new = BadgeCatalog::spec(BadgeDomain::FindingStatus, 'new');
    expect($new->label)->toBe('New');
    expect($new->color)->toBe('warning');

    $acknowledged = BadgeCatalog::spec(BadgeDomain::FindingStatus, 'acknowledged');
    expect($acknowledged->label)->toBe('Acknowledged');
    expect($acknowledged->color)->toBe('gray');
});
