TenantAtlas/apps/platform/app/Support/Badges/Domains/GovernanceArtifactRetentionBadge.php
ahmido 6bf8e7f76b feat: 267-artifact-lifecycle-retention → platform-dev (#323)
Automated PR to merge `267-artifact-lifecycle-retention` into `platform-dev`.

Created by Copilot.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #323
2026-05-03 20:30:51 +00:00

23 lines
813 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 GovernanceArtifactRetentionBadge implements BadgeMapper
{
public function spec(mixed $value): BadgeSpec
{
return match (BadgeCatalog::normalizeState($value)) {
'retained' => new BadgeSpec('Retained', 'info', 'heroicon-m-archive-box'),
'hold' => new BadgeSpec('On hold', 'warning', 'heroicon-m-lock-closed'),
'deletion_requested' => new BadgeSpec('Deletion requested', 'danger', 'heroicon-m-trash'),
'expired_direct_access' => new BadgeSpec('Direct access expired', 'gray', 'heroicon-m-clock'),
default => BadgeSpec::unknown(),
};
}
}