# Copyright (c) 2025 Patrick Motsch
# All rights reserved.
"""
Streaming service for SSE event management.
Core service - not requested by features directly.
"""

import logging
from typing import Any, Callable

from modules.serviceCenter.core.serviceStreaming.eventManager import EventManager, get_event_manager
from modules.serviceCenter.core.serviceStreaming.helpers import ChatStreamingHelper

logger = logging.getLogger(__name__)


class StreamingService:
    """Streaming service providing access to SSE event infrastructure."""

    def __init__(self, context: Any, get_service: Callable[[str], Any]):
        """Initialize with service center context and resolver."""
        self._context = context
        self._get_service = get_service

    def getEventManager(self) -> EventManager:
        """Get the global event manager instance for SSE streaming."""
        return get_event_manager()

    def getChatStreamingHelper(self):
        """Get ChatStreamingHelper utility for message normalization (no legacy import at call site)."""
        return ChatStreamingHelper
