"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";

// src/contexts/chat-runtime-context.tsx
var _react = require('react');
var ChatRuntimeContext = _react.createContext.call(void 0, null);
function useChatRuntime() {
  return _react.useContext.call(void 0, ChatRuntimeContext);
}
function useRequiredChatRuntime() {
  const v = _react.useContext.call(void 0, ChatRuntimeContext);
  if (!v) {
    throw new Error(
      "[chat-runtime] hook called outside a <ChatRuntimeContext.Provider>. The hub mounts <HubRuntimeProvider> at root \u2014 this only fires when chat internals are rendered above the provider tree. Fix: ensure the rendering subtree descends from the runtime provider. In tests/Storybook: wrap with <HubRuntimeProvider> or supply a <ChatRuntimeContext.Provider value={mockedRuntime}>."
    );
  }
  return v;
}





exports.ChatRuntimeContext = ChatRuntimeContext; exports.useChatRuntime = useChatRuntime; exports.useRequiredChatRuntime = useRequiredChatRuntime;
//# sourceMappingURL=chunk-MEAR2WHS.cjs.map