<?php

namespace App\Enums;

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

enum OutletStatus: int
{
    use WithCommentEnum, WithValueEnum;

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

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

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