<?php

declare(strict_types=1);

namespace App\Service\Config;

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

final readonly class AppName implements Stringable
{
    public function __construct(
        private ConfigurationService $configService,
    ) {}

    public function __toString(): string
    {
        return $this->configService->getConfigValue(SystemSettingKey::SYSTEM_NAME, SystemConfig::DEFAULT_SYSTEM_NAME);
    }
}
