<?php

namespace App\Enums;

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

enum UserStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case ACTIVE = 1;
    case INACTIVE = 2;

    public function label(): string
    {
        return match ($this) {
            self::ACTIVE => 'Aktif',
            self::INACTIVE => 'Tidak Aktif',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::ACTIVE => 'emerald',
            self::INACTIVE => 'yellow',
        };
    }

    public function gradient(): string
    {
        return match ($this) {
            self::ACTIVE => 'bg-gradient-to-b from-emerald-800 to-emerald-400',
            self::INACTIVE => 'bg-gradient-to-b from-yellow-800 to-yellow-400',
        };
    }
}
