<?php

namespace App\Enums;

use App\Enums\Concerns\HasValues;

enum CashTransactionType: string
{
    use HasValues;

    case DEPOSIT = 'deposit';
    case EXPENSE = 'expense';
    case WITHDRAWAL = 'withdrawal';
    case EMPLOYEE_ADVANCE = 'employee_advance';

    public function label(): string
    {
        return match ($this) {
            self::DEPOSIT => 'Deposit',
            self::EXPENSE => 'Pengeluaran',
            self::WITHDRAWAL => 'Withdrawal',
            self::EMPLOYEE_ADVANCE => 'Kasbon',
        };
    }
}
