<?php

namespace App\Domain\Inventory\Enums;

/**
 * Values match product_customizations_type_check character for character.
 */
enum ProductCustomizationType: string
{
    case Text = 'text';
    case Select = 'select';

    public function labelAr(): string
    {
        return match ($this) {
            self::Text => 'إدخال نص',
            self::Select => 'اختيار من قائمة',
        };
    }

    /** @return array<string, string> value => Arabic label, for pickers. */
    public static function options(): array
    {
        $out = [];
        foreach (self::cases() as $case) {
            $out[$case->value] = $case->labelAr();
        }
        return $out;
    }
}
