import { j as jsxRuntimeExports } from "../../../../../_virtual/jsx-runtime.js";
import { a as k } from "../../../../sdk/dist/shared/chunk-B3EATRFX.js";
import "../../../../sdk/dist/shared/chunk-3YVJ2ELD.js";
import "../../../../sdk/dist/shared/chunk-AFVJZPLS.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-A3GF4PYW.js";
import "../../../../sdk/dist/shared/chunk-W33JMRRN.js";
import BrickWrapper from "../components/BrickWrapper.js";
import EditableBrickWrapper from "../../editor/components/EditableBrick.js";
import { tx as D } from "../../../../style-system/dist/twind.js";
import BrickRoot from "../components/BrickRoot.js";
import { useBrickStyle } from "../hooks/use-brick-style.js";
function Box({
  brick,
  editable,
  isDynamicPreview,
  iterationIndex,
  level = 0
}) {
  const styles = useBrickStyle(brick);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(BrickRoot, { editable, manifest: k, className: D(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.js.map
