import { jsx as r } from "react/jsx-runtime";
import l from "react";
import { ChatRuntimeProvider as p } from "./ChatRuntime.es.js";
import { CustomComponentProvider as a } from "./CustomComponentProvider.es.js";
import { FileProvider as c } from "./FileProvider.es.js";
import { StreamProvider as f } from "./Stream.es.js";
import { ThreadProvider as h } from "./Thread.es.js";
import { SuggestionProvider as v } from "./useChatSuggestions.es.js";
function _({
  apiUrl: i,
  assistantId: o,
  identity: e,
  children: t,
  customComponents: m,
  suspenseFallback: n = /* @__PURE__ */ r("div", { children: "Loading chat..." }),
  initialMode: d = "single"
}) {
  return /* @__PURE__ */ r(l.Suspense, { fallback: n, children: /* @__PURE__ */ r(
    p,
    {
      apiUrl: i,
      assistantId: o,
      identity: e,
      children: /* @__PURE__ */ r(h, { initialMode: d, children: /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(a, { initialComponents: m, children: /* @__PURE__ */ r(c, { children: t }) }) }) }) })
    }
  ) });
}
export {
  _ as ChatProvider
};
//# sourceMappingURL=ChatProvider.es.js.map
