import { j as jsxRuntimeExports } from "./jsx-runtime.CXYVdt5g.js";
import { b2 as manifest } from "./use-editor.CurXdZnZ.js";
import "@sinclair/typebox";
import "lodash-es";
import { B as BrickWrapper } from "./BrickWrapper.CKpu51yC.js";
import { E as EditableBrickWrapper } from "./EditableBrick._QgTWAFS.js";
import { a as tx } from "./twind.B1qQmF_s.js";
import { B as BrickRoot } from "./BrickRoot.C4Jpjw20.js";
import { b as useBrickStyle } from "./use-section-style.D8_SY6rK.js";
function Box({
  brick,
  editable,
  isDynamicPreview,
  iterationIndex,
  level = 0
}) {
  const styles = useBrickStyle(brick);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(BrickRoot, { editable, manifest, className: tx(Object.values(styles)), brick, children: brick.props.$children?.map(
    (child, index) => editable ? /* @__PURE__ */ jsxRuntimeExports.jsx(
      EditableBrickWrapper,
      {
        brick: child,
        index,
        iterationIndex,
        isDynamicPreview
      },
      child.id
    ) : /* @__PURE__ */ jsxRuntimeExports.jsx(BrickWrapper, { brick: child }, child.id)
  ) });
}
export {
  Box as default
};
//# sourceMappingURL=box.C-kUCMok.js.map
