<?php

namespace MintyPHP\Domain\Taxonomy;

enum ScheduledJobRunStatus: string
{
    use SupportsStringTaxonomy;

    case Success = 'success';
    case Failed = 'failed';
    case Skipped = 'skipped';

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

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