import { jsx } from "react/jsx-runtime";
import react from "react";
const AutopilotChatServiceContext = /*#__PURE__*/ react.createContext({
    chatService: void 0
});
function AutopilotChatServiceProvider({ chatServiceInstance, children }) {
    const chatService = chatServiceInstance;
    return /*#__PURE__*/ jsx(AutopilotChatServiceContext.Provider, {
        value: {
            chatService
        },
        children: children
    });
}
function useChatService() {
    const context = react.useContext(AutopilotChatServiceContext);
    if (!context) throw new Error('useChatService must be used within a AutopilotChatServiceProvider');
    return context.chatService;
}
export { AutopilotChatServiceContext, AutopilotChatServiceProvider, useChatService };
