import { jsx } from "react/jsx-runtime";
import { aG as manifest } from "./use-page-data.BgY0vKG4.js";
import { B as BrickWrapper } from "./BrickWrapper.Bb-8CB0_.js";
import { E as EditableBrickWrapper } from "./EditableBrick.B6DwOA4h.js";
import { a as tx } from "./twind.DdSZmZu6.js";
import { B as BrickRoot } from "./BrickRoot.D_a_fRJm.js";
import { b as useBrickStyle } from "./use-section-style.BSe5at-8.js";
function Box({
  brick,
  editable,
  isDynamicPreview,
  iterationIndex,
  level = 0
}) {
  const styles = useBrickStyle(brick);
  return /* @__PURE__ */ jsx(BrickRoot, { editable, manifest, className: tx(Object.values(styles)), brick, children: brick.props.$children?.map(
    (child, index) => editable ? /* @__PURE__ */ jsx(
      EditableBrickWrapper,
      {
        brick: child,
        index,
        iterationIndex,
        isDynamicPreview
      },
      child.id
    ) : /* @__PURE__ */ jsx(BrickWrapper, { brick: child }, child.id)
  ) });
}
export {
  Box as default
};
//# sourceMappingURL=box.DLXD0_Wm.js.map
