<?php

declare(strict_types=1);

namespace App\Support\Enums;

use App\Support\Concerns\TranslatesDberpBackedEnumLabel;

enum DberpDocumentLineBarcodeDuplicateMode: string
{
    use TranslatesDberpBackedEnumLabel;

    case IncreaseQuantity = 'increase_quantity';
    case AddNewLine = 'add_new_line';
    case SkipExisting = 'skip_existing';

    public function label(): string
    {
        return match ($this) {
            self::IncreaseQuantity => (string) __('dberp.fields.barcode_duplicate_increase_quantity'),
            self::AddNewLine => (string) __('dberp.fields.barcode_duplicate_add_new_line'),
            self::SkipExisting => (string) __('dberp.fields.barcode_duplicate_skip_existing'),
        };
    }
}
