<?php

namespace App\Enums;

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

enum IsPaid: int
{
    use WithCommentEnum, WithValueEnum;

    case PAID = 1;
    case NOT_PAID = 2;

    public function label()
    {
        return match ($this) {
            self::PAID => 'Dibayar',
            self::NOT_PAID => 'Belum Dibayar',
        };
    }

    public function color()
    {
        return match ($this) {
            self::PAID => 'emerald',
            self::NOT_PAID => 'red',
        };
    }
}
