<?php

declare(strict_types=1);

namespace App\Enum;

use App\Entity\SystemConfig;

/**
 * Enum for system setting keys
 */
enum SystemSettingKey: string
{
    case STOCK_ADJUSTMENT_LOOKBACK_ORDERS = 'stock_adjustment_lookback_orders';
    case DEFAULT_DESIRED_STOCK = 'default_desired_stock';
    case SYSTEM_NAME = 'system_name';
    case STOCK_INCREASE_AMOUNT = 'stock_increase_amount';
    case STOCK_DECREASE_AMOUNT = 'stock_decrease_amount';
    case STOCK_LOW_MULTIPLIER = 'stock_low_multiplier';

    public static function getDefaultValue(self $key): string
    {
        return match ($key) {
            self::STOCK_ADJUSTMENT_LOOKBACK_ORDERS => SystemConfig::DEFAULT_STOCK_ADJUSTMENT_LOOKBACK_ORDERS,
            self::DEFAULT_DESIRED_STOCK => SystemConfig::DEFAULT_DEFAULT_DESIRED_STOCK,
            self::SYSTEM_NAME => SystemConfig::DEFAULT_SYSTEM_NAME,
            self::STOCK_INCREASE_AMOUNT => SystemConfig::DEFAULT_STOCK_INCREASE_AMOUNT,
            self::STOCK_DECREASE_AMOUNT => SystemConfig::DEFAULT_STOCK_DECREASE_AMOUNT,
            self::STOCK_LOW_MULTIPLIER => SystemConfig::DEFAULT_STOCK_LOW_MULTIPLIER,
        };
    }
}
