<?php

namespace App\Enums;

use App\Traits\Enums\WithCommentEnum;
use App\Traits\Enums\WithValueEnum;

enum OutletStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case OPERATIONAL = 1;
    case UNDER_CONSTRUCTION = 2;
    case TERMINATED = 3;

    public function label(): string
    {
        return match ($this) {
            self::OPERATIONAL => 'Operasional',
            self::UNDER_CONSTRUCTION => 'Dalam Konstruksi',
            self::TERMINATED => 'Dihentikan',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::OPERATIONAL => 'emerald',
            self::UNDER_CONSTRUCTION => 'yellow',
            self::TERMINATED => 'red',
        };
    }
}
