<?php

namespace MintyPHP\Service\Branding;

use MintyPHP\Service\Settings\SettingsAppGateway;

class BrandingServicesFactory
{
    private ?BrandingLogoService $brandingLogoService = null;
    private ?BrandingFaviconService $brandingFaviconService = null;

    public function __construct(
        private readonly SettingsAppGateway $settingsAppGateway
    ) {
    }

    public function createBrandingLogoService(): BrandingLogoService
    {
        return $this->brandingLogoService ??= new BrandingLogoService();
    }

    public function createBrandingFaviconService(): BrandingFaviconService
    {
        return $this->brandingFaviconService ??= new BrandingFaviconService($this->createSettingsAppGateway());
    }

    private function createSettingsAppGateway(): SettingsAppGateway
    {
        return $this->settingsAppGateway;
    }
}
