<?php

namespace MintyPHP\Module\Audit\Domain;

use MintyPHP\Domain\Taxonomy\SupportsStringTaxonomy;

enum SystemAuditOutcome: string
{
    use SupportsStringTaxonomy;

    case Success = 'success';
    case Failed = 'failed';
    case Denied = 'denied';

    public function labelToken(): string
    {
        return match ($this) {
            self::Success => 'Success',
            self::Failed => 'Failed',
            self::Denied => 'Denied',
        };
    }

    public function badgeVariant(): string
    {
        return match ($this) {
            self::Success => 'success',
            self::Failed => 'danger',
            self::Denied => 'warning',
        };
    }
}
