let streamingEnabled = false;
const listeners = /* @__PURE__ */ new Set();
function isStreamingEnabled() {
  return streamingEnabled;
}
function setStreamingEnabled(enabled) {
  if (streamingEnabled !== enabled) {
    streamingEnabled = enabled;
    listeners.forEach((listener) => listener(enabled));
  }
}
function toggleStreaming() {
  setStreamingEnabled(!streamingEnabled);
  return streamingEnabled;
}
function subscribeToStreaming(listener) {
  listeners.add(listener);
  return () => listeners.delete(listener);
}
export {
  isStreamingEnabled,
  setStreamingEnabled,
  subscribeToStreaming,
  toggleStreaming
};
