"use client";
import { jsx as r, jsxs as f } from "react/jsx-runtime";
import "../../../config/theme.config.js";
import { BuilderConfiguration as a } from "../../../config/builder.config.js";
import { useAppDispatch as s } from "../../../hooks/use-app-dispatch.js";
import { clearContent as l, setContent as n } from "../../../store/builder-slice.js";
import { classNames as c } from "../../../../../../utils.js";
import { useEffect as i } from "react";
import { HTML5Backend as d } from "../../../../../../node_modules/.pnpm/react-dnd-html5-backend@16.0.1/node_modules/react-dnd-html5-backend/dist/index.js";
import { LeftPanel as h } from "./left-panel.js";
import { RightPanel as u } from "./right-panel.js";
import "../../shared/accordion.js";
import "../../shared/select.js";
import "../../shared/tooltip.js";
import "../../../../../../store/selectors.js";
import "../../shared/button.js";
import "../../shared/checkbox.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/alpha/Alpha.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/block/Block.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/circle/Circle.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/chrome/Chrome.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/compact/Compact.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/github/Github.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/hue/Hue.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/material/Material.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/photoshop/Photoshop.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/sketch/Sketch.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/slider/Slider.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/swatches/Swatches.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/twitter/Twitter.js";
import "../../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/google/Google.js";
import "../../../../../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js";
import "../../shared/context-menu.js";
import "../../shared/dialog.js";
import "../../shared/drawer.js";
import "../../../store/theme-slice.js";
import "../../../../../../_virtual/cjs.js";
import "../../../contexts/action-context.js";
import "../../../contexts/frame-context.js";
import "../../../store/app-slice.js";
import "../../shared/hover-card.js";
import "../../shared/input.js";
import "../../shared/label.js";
import "../../shared/popover.js";
import "../../shared/range-slider.js";
import "../../shared/scroll-area.js";
import "../../shared/separator.js";
import "../../shared/switch.js";
import "../../shared/tabs.js";
import "../../../../../../node_modules/.pnpm/@tiptap_extension-link@2.23.0_@tiptap_core@2.23.0_@tiptap_pm@2.23.0__@tiptap_pm@2.23.0/node_modules/@tiptap/extension-link/dist/index.js";
import "../../../../../../node_modules/.pnpm/@tiptap_extension-placeholder@2.23.0_@tiptap_core@2.23.0_@tiptap_pm@2.23.0__@tiptap_pm@2.23.0/node_modules/@tiptap/extension-placeholder/dist/index.js";
import "../../../../../../node_modules/.pnpm/@tiptap_starter-kit@2.23.0/node_modules/@tiptap/starter-kit/dist/index.js";
import "../../shared/textarea.js";
import "../../controls/slider-unit.control.js";
import "../../controls/toggle-group.control.js";
import "../../controls/spacing.control.js";
import "../../../../../../_virtual/lodash.js";
import "../../../../../../node_modules/.pnpm/@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@monaco-editor/react/dist/index.js";
import "../../controls/flex-gap.control.js";
import "../../../../../../_virtual/index4.js";
import { CanvasArea as v } from "./canvas-area.js";
import "../../../../../../node_modules/.pnpm/react-hot-toast@2.5.2_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/react-hot-toast/dist/index.js";
import "../../shared/content-editable.js";
import "./block-control-panel.js";
import "./block-navigation.js";
import "./block-navigation-item.js";
import "../editor-asset-manager.js";
import "../render-block.js";
import "../asset-manager.js";
import "../editor-render-block.js";
import "../block-toolbar.js";
import { DndProvider as x } from "../../../../../../node_modules/.pnpm/react-dnd@16.0.1_@types_node@22.13.4_@types_react@19.0.10_react@19.0.0/node_modules/react-dnd/dist/core/DndProvider.js";
const yr = ({ content: o, className: p, builderConfig: m, ...e }) => {
  const t = s();
  return i(() => {
    if (!o) {
      t(l());
      return;
    }
    t(n(o));
  }, [o]), i(() => {
    m && a.mergeConfig(m);
  }, [m]), /* @__PURE__ */ r(x, { backend: d, children: /* @__PURE__ */ f(
    "div",
    {
      className: c("relative flex h-full w-full flex-wrap overflow-hidden", p),
      ...e,
      children: [
        /* @__PURE__ */ r(h, {}),
        /* @__PURE__ */ r(v, {}),
        /* @__PURE__ */ r(u, {})
      ]
    }
  ) });
};
export {
  yr as Editor
};
//# sourceMappingURL=editor.js.map
