<?php

namespace App\Services;

use App\DTO\Settings\ConfigDTO;
use Openguru\OpenCartFramework\Config\Settings;

class SettingsService extends Settings
{
    private ConfigDTO $config;

    public function __construct(array $config, SettingsSerializerService $serializer)
    {
        parent::__construct($config);

        $this->config = $serializer->fromArray($config);
    }

    public function config(): ConfigDTO
    {
        return $this->config;
    }
}
