<?php

declare(strict_types=1);

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

it('returns a safe unknown badge spec for unknown values', function (): void {
    $spec = BadgeCatalog::spec(BadgeDomain::OperationRunStatus, 'not-a-real-status');

    expect($spec)->toBeInstanceOf(BadgeSpec::class);
    expect($spec->label)->toBe('Unknown');
    expect($spec->color)->toBe('gray');
});

it('defines the allowed Filament badge colors', function (): void {
    expect(BadgeSpec::allowedColors())->toBe([
        'gray',
        'info',
        'success',
        'warning',
        'danger',
        'primary',
    ]);
});
