TenantAtlas/apps/platform/app/Support/Badges/Domains/GovernanceArtifactLifecycleBadge.php
Ahmed Darrazi d091d84ddf
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 4m47s
chore: commit all workspace changes (automated)
2026-05-03 22:26:40 +02:00

22 lines
704 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\Badges\Domains;
use App\Support\Badges\BadgeCatalog;
use App\Support\Badges\BadgeMapper;
use App\Support\Badges\BadgeSpec;
final class GovernanceArtifactLifecycleBadge implements BadgeMapper
{
public function spec(mixed $value): BadgeSpec
{
return match (BadgeCatalog::normalizeState($value)) {
'current' => new BadgeSpec('Current', 'success', 'heroicon-m-check-circle'),
'historical' => new BadgeSpec('Historical', 'gray', 'heroicon-m-archive-box'),
'superseded' => new BadgeSpec('Superseded', 'warning', 'heroicon-m-arrow-path'),
default => BadgeSpec::unknown(),
};
}
}