<?php

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

it('maps onboarding verification status blocked to a Blocked danger badge', function (): void {
    $spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'blocked');

    expect($spec->label)->toBe('Blocked');
    expect($spec->color)->toBe('danger');
    expect($spec->icon)->toBe('heroicon-m-x-circle');
});

it('maps onboarding verification status ready to a Ready success badge', function (): void {
    $spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'ready');

    expect($spec->label)->toBe('Ready');
    expect($spec->color)->toBe('success');
    expect($spec->icon)->toBe('heroicon-m-check-circle');
});

it('normalizes onboarding verification status input before mapping', function (): void {
    $spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'NEEDS ATTENTION');

    expect($spec->label)->toBe('Needs attention');
});
