<?php

namespace MintyPHP\Service\Directory;

use MintyPHP\Service\Settings\SettingsAppGateway;
use MintyPHP\Service\Settings\SettingsDefaultsGateway;

class DirectorySettingsGateway
{
    public function __construct(
        private readonly SettingsDefaultsGateway $settingsDefaultsGateway,
        private readonly SettingsAppGateway $settingsAppGateway
    ) {
    }

    public function setDefaultTenantId(?int $tenantId): void
    {
        $this->settingsDefaultsGateway->setDefaultTenantId($tenantId);
    }

    public function setDefaultDepartmentId(?int $departmentId): void
    {
        $this->settingsDefaultsGateway->setDefaultDepartmentId($departmentId);
    }

    public function setDefaultRoleId(?int $roleId): void
    {
        $this->settingsDefaultsGateway->setDefaultRoleId($roleId);
    }

    public function isAllowedTheme(string $theme): bool
    {
        return $this->settingsAppGateway->isAllowedTheme($theme);
    }

    public function normalizeTheme(?string $theme): string
    {
        return $this->settingsAppGateway->normalizeTheme($theme);
    }
}
