<?php

namespace App\Enums;

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

enum StockOpnameStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case DRAFT = 1;
    case PROCESS = 2;
    case PENDING_APPROVAL = 3;
    case COMPLETED = 4;

    public function label(): string
    {
        return match ($this) {
            self::DRAFT => 'Draft',
            self::PROCESS => 'Proses',
            self::PENDING_APPROVAL => 'Menunggu Persetujuan',
            self::COMPLETED => 'Selesai',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::DRAFT => 'yellow',
            self::PROCESS => 'teal',
            self::PENDING_APPROVAL => 'orange',
            self::COMPLETED => 'emerald',
        };
    }
}
