<?php

namespace MintyPHP\Domain\Taxonomy;

enum ScheduledJobStatus: string
{
    use SupportsStringTaxonomy;

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

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

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