import { j as jsxRuntimeExports } from "./jsx-runtime.CXYVdt5g.js";
import { aP as manifest } from "./use-page-data.iZIVKDBc.js";
import "@sinclair/typebox";
import "lodash-es";
import { B as BrickWrapper } from "./BrickWrapper.CeTKjenq.js";
import { E as EditableBrickWrapper } from "./EditableBrick.BVV4XLd4.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.BVVfH7jL.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.BMQGNlvL.js.map
