<?php

namespace Modules\SystemCore\App\Enums;

enum ProductStatus: string
{
    case Active = 'active';
    case Inactive = 'inactive';
    case Discontinued = 'discontinued';
    case OutOfStock = 'out_of_stock';
    case Draft = 'draft';

    public function label(): string
    {
        return match ($this) {
            self::Active => __('Active'),
            self::Inactive => __('Inactive'),
            self::Discontinued => __('Discontinued'),
            self::OutOfStock => __('Out of Stock'),
            self::Draft => __('Draft'),
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Active => 'success',
            self::Inactive => 'secondary',
            self::Discontinued => 'danger',
            self::OutOfStock => 'warning',
            self::Draft => 'info',
        };
    }
}
