from __future__ import annotations

from typing import TYPE_CHECKING, Optional

if TYPE_CHECKING:
    from src.api.preview_manager import PreviewManager
    from src.api.serverproxy_manager import ServerProxyManager
    from src.distributed_job_manager import DistributedJobManager
    from src.engines.engine_manager import EngineManager
    from src.render_queue import RenderQueue
    from src.utilities.config import Config
    from src.utilities.zeroconf_server import ZeroconfServer


class ApplicationContext:
    """Holds all service instances. Single source of truth for wiring."""

    def __init__(self) -> None:
        self.config: Optional[Config] = None
        self.engine_manager: Optional[EngineManager] = None
        self.preview_manager: Optional[PreviewManager] = None
        self.zeroconf_server: Optional[ZeroconfServer] = None
        self.render_queue: Optional[RenderQueue] = None
        self.distributed_job_manager: Optional[DistributedJobManager] = None
        self.server_proxy_manager: Optional[ServerProxyManager] = None
