# File: src/noveler/domain/services/configuration_manager_service.py
# Purpose: Lightweight configuration manager stub used by legacy stepwise
#          writing services during A38 migration.
# Context: Provides method placeholders so services can be instantiated in tests
#          without requiring the full configuration subsystem.

"""In-memory configuration manager stub utilised by legacy domain services."""

from __future__ import annotations

from typing import Any


class ConfigurationManagerService:
    """Minimal stub for dependency-injected configuration manager."""

    def __init__(self, initial_config: dict[str, Any] | None = None) -> None:
        self._config = initial_config or {}

    def get(self, key: str, default: Any = None) -> Any:
        """Dictionary-style accessor for stored configuration."""
        return self._config.get(key, default)

    def set(self, key: str, value: Any) -> None:
        """Store or override a configuration value."""
        self._config[key] = value

    def load_project_config(self, project_root: str | None = None) -> dict[str, Any]:
        """Return the current configuration snapshot."""
        return dict(self._config)
