"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var TldrawUiContextProvider_exports = {};
__export(TldrawUiContextProvider_exports, {
  TldrawUiContextProvider: () => TldrawUiContextProvider
});
module.exports = __toCommonJS(TldrawUiContextProvider_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_assetUrls = require("./assetUrls");
var import_useActions = require("./hooks/useActions");
var import_useActionsMenuSchema = require("./hooks/useActionsMenuSchema");
var import_useAssetUrls = require("./hooks/useAssetUrls");
var import_useBreakpoint = require("./hooks/useBreakpoint");
var import_useContextMenuSchema = require("./hooks/useContextMenuSchema");
var import_useDialogsProvider = require("./hooks/useDialogsProvider");
var import_useEventsProvider = require("./hooks/useEventsProvider");
var import_useHelpMenuSchema = require("./hooks/useHelpMenuSchema");
var import_useKeyboardShortcutsSchema = require("./hooks/useKeyboardShortcutsSchema");
var import_useMenuSchema = require("./hooks/useMenuSchema");
var import_useToastsProvider = require("./hooks/useToastsProvider");
var import_useToolbarSchema = require("./hooks/useToolbarSchema");
var import_useTools = require("./hooks/useTools");
var import_useTranslation = require("./hooks/useTranslation/useTranslation");
var import_overrides = require("./overrides");
function TldrawUiContextProvider({
  overrides,
  assetUrls,
  onUiEvent,
  children
}) {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useAssetUrls.AssetUrlsProvider, { assetUrls: (0, import_assetUrls.useDefaultUiAssetUrlsWithOverrides)(assetUrls), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useTranslation.TranslationProvider, { overrides: (0, import_overrides.useMergedTranslationOverrides)(overrides), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useEventsProvider.UiEventsProvider, { onEvent: onUiEvent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useToastsProvider.ToastsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useDialogsProvider.DialogsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useBreakpoint.BreakPointProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InternalProviders, { overrides, children }) }) }) }) }) }) });
}
function InternalProviders({
  overrides,
  children
}) {
  const mergedOverrides = (0, import_overrides.useMergedOverrides)(overrides);
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useActions.ActionsProvider, { overrides: mergedOverrides.actions, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useTools.ToolsProvider, { overrides: mergedOverrides.tools, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useToolbarSchema.ToolbarSchemaProvider, { overrides: mergedOverrides.toolbar, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useActionsMenuSchema.ActionsMenuSchemaProvider, { overrides: mergedOverrides.actionsMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useKeyboardShortcutsSchema.KeyboardShortcutsSchemaProvider, { overrides: mergedOverrides.keyboardShortcutsMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useContextMenuSchema.TLUiContextMenuSchemaProvider, { overrides: mergedOverrides.contextMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useHelpMenuSchema.HelpMenuSchemaProvider, { overrides: mergedOverrides.helpMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_useMenuSchema.TLUiMenuSchemaProvider, { overrides: mergedOverrides.menu, children }) }) }) }) }) }) }) });
}
//# sourceMappingURL=TldrawUiContextProvider.js.map
