<?php

namespace App\Domain\Pricing\Enums;

enum AdjustmentType: string
{
    case PercentageDiscount = 'percentage_discount';
    case FixedDiscount = 'fixed_discount';
    case FixedPrice = 'fixed_price';
    case PercentageIncrease = 'percentage_increase';

    public function label(): string
    {
        return match ($this) {
            self::PercentageDiscount => 'خصم نسبة مئوية',
            self::FixedDiscount => 'خصم مبلغ ثابت',
            self::FixedPrice => 'سعر ثابت',
            self::PercentageIncrease => 'زيادة نسبة مئوية',
        };
    }

    public function isDiscount(): bool
    {
        return in_array($this, [self::PercentageDiscount, self::FixedDiscount]);
    }
}
