<?php

namespace App\Enums;

enum InvoiceStatus: string
{
    case Active = 'active';
    case Paid = 'paid';
    case PartiallyPaid = 'partially_paid';
    case Cancelled = 'cancelled';
    case Void = 'void';

    public function label(): string
    {
        return __('status.invoice_'.$this->value);
    }

    public function isOpen(): bool
    {
        return in_array($this, [self::Active, self::PartiallyPaid], true);
    }
}
