<?php

declare(strict_types=1);

namespace App\Service\Config;

use App\Entity\SystemConfig;
use App\Enum\SystemSettingKey;
use App\Service\ConfigurationService;

final readonly class LowStockMultiplier
{
    public function __construct(
        private ConfigurationService $configService,
    ) {}

    public function getValue(): float
    {
        $value = $this->configService->getConfigValue(
            SystemSettingKey::STOCK_LOW_MULTIPLIER,
            SystemConfig::DEFAULT_STOCK_LOW_MULTIPLIER,
        );

        return (float) $value;
    }
}
