<?php

namespace App\ServiceProviders;

use App\Services\SettingsSerializerService;
use App\Services\SettingsService;
use Openguru\OpenCartFramework\Container\Container;
use Openguru\OpenCartFramework\Container\ServiceProvider;

class SettingsServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->container->singleton(SettingsService::class, function (Container $container) {
            return new SettingsService(
                $container->getConfigValue(),
                $container->get(SettingsSerializerService::class)
            );
        });
    }
}
