import { askQuestionBtnClickedAtom, chatIsOpenAtom, chatOnToggleAtom, formSubmitAtom, initializedAtom, listeningToSpeechAtom, messagesAtom, pendingResponseAtom, replyEventCategoryAtom, requestFailureAtom, responseStreamingAtom, suggestionAtom, suggestionsAtom, suggestionsLoadingAtom, userEventsAtom, userHasRepliedAtom, userQueryAtom } from "./chatState.js";
import { APP_INITIAL_START_TIME_KEY, PAGE_LOAD_OFFSET_TIME_KEY, PerfMetricsEvents, appInitialStartTimeMsAtom, hasReportedPerformanceMetricsAtom, logPerfMetricAtom, pageLoadOffsetTimeAtom, performanceMetricsAtom, resetPerformanceMetricsAtom } from "./performanceMetrics.js";
import { clearUserEventAtom, processUserEventAtom, queueUserEventAtom, userEventQueueAtom, userQueueEventCountAtom } from "./messageQueue.js";
import { handleFormSubmittedAtom } from "./form.js";
import { handleSuggestionAtom } from "./suggestions.js";
import { lastAssistantMessageAtom } from "./lastMessage.js";
import { addWidget, widgetArrayAtom } from "./renderedWidgetRefs.js";
import { atom } from "jotai";

//#region src/atoms/chat/index.ts
const chatAtom = atom((get) => ({
	userHasReplied: get(userHasRepliedAtom),
	replyEventCategory: get(replyEventCategoryAtom),
	userQuery: get(userQueryAtom),
	suggestion: get(suggestionAtom),
	askQuestionBtnClicked: get(askQuestionBtnClickedAtom),
	messages: get(messagesAtom),
	userEvents: get(userEventsAtom),
	suggestions: get(suggestionsAtom),
	suggestionsLoading: get(suggestionsLoadingAtom),
	responseStreaming: get(responseStreamingAtom),
	isOpen: get(chatIsOpenAtom),
	onToggle: get(chatOnToggleAtom)
}));

//#endregion
export { APP_INITIAL_START_TIME_KEY, PAGE_LOAD_OFFSET_TIME_KEY, PerfMetricsEvents, addWidget, appInitialStartTimeMsAtom, askQuestionBtnClickedAtom, chatAtom, chatIsOpenAtom, chatOnToggleAtom, clearUserEventAtom, formSubmitAtom, handleFormSubmittedAtom, handleSuggestionAtom, hasReportedPerformanceMetricsAtom, initializedAtom, lastAssistantMessageAtom, listeningToSpeechAtom, logPerfMetricAtom, messagesAtom, pageLoadOffsetTimeAtom, pendingResponseAtom, performanceMetricsAtom, processUserEventAtom, queueUserEventAtom, replyEventCategoryAtom, requestFailureAtom, resetPerformanceMetricsAtom, responseStreamingAtom, suggestionAtom, suggestionsAtom, suggestionsLoadingAtom, userEventQueueAtom, userEventsAtom, userHasRepliedAtom, userQueryAtom, userQueueEventCountAtom, widgetArrayAtom };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2F0b21zL2NoYXQvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYXRvbSB9IGZyb20gJ2pvdGFpJztcbmltcG9ydCB7XG4gIGFza1F1ZXN0aW9uQnRuQ2xpY2tlZEF0b20sXG4gIGNoYXRJc09wZW5BdG9tLFxuICBjaGF0T25Ub2dnbGVBdG9tLFxuICBtZXNzYWdlc0F0b20sXG4gIHJlcGx5RXZlbnRDYXRlZ29yeUF0b20sXG4gIHJlc3BvbnNlU3RyZWFtaW5nQXRvbSxcbiAgc3VnZ2VzdGlvbkF0b20sXG4gIHN1Z2dlc3Rpb25zQXRvbSxcbiAgc3VnZ2VzdGlvbnNMb2FkaW5nQXRvbSxcbiAgdXNlckV2ZW50c0F0b20sXG4gIHVzZXJIYXNSZXBsaWVkQXRvbSxcbiAgdXNlclF1ZXJ5QXRvbSxcbn0gZnJvbSAnLi9jaGF0U3RhdGUnO1xuXG5leHBvcnQgKiBmcm9tICcuL2NoYXRTdGF0ZSc7XG5leHBvcnQgKiBmcm9tICcuL3BlcmZvcm1hbmNlTWV0cmljcyc7XG5leHBvcnQgKiBmcm9tICcuL2Zvcm0nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWdnZXN0aW9ucyc7XG5leHBvcnQgKiBmcm9tICcuL2xhc3RNZXNzYWdlJztcbmV4cG9ydCAqI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