import { jsx } from "react/jsx-runtime";
import { aJ as manifest } from "./use-page-data.CMUQyNAA.js";
import "@sinclair/typebox";
import { B as BrickWrapper } from "./BrickWrapper.DbYQbPM-.js";
import { E as EditableBrickWrapper } from "./EditableBrick.CRrEMcPC.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.DjjgfIQS.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.CueluKXP.js.map
