import { j as t } from "../../../../../_virtual/jsx-runtime.js";
import { a } from "../../../../sdk/dist/shared/chunk-KHFNN4P3.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-UU2MSQXY.js";
import "../../../../sdk/dist/shared/chunk-YBGPPF7T.js";
import "../../../../sdk/dist/shared/chunk-UMHXXXVP.js";
import "../../../../sdk/dist/shared/chunk-5N6MBJJ4.js";
import f from "../components/BrickWrapper.js";
import n from "../../editor/components/EditableBrick.js";
import { tx as x } from "../../../../style-system/dist/twind.js";
import c from "../components/BrickRoot.js";
import { useBrickStyle as j } from "../hooks/use-brick-style.js";
function O({
  brick: o,
  editable: m,
  isDynamicPreview: p,
  iterationIndex: i,
  level: l = 0
}) {
  const s = j(o);
  return /* @__PURE__ */ t.jsx(c, { editable: m, manifest: a, className: x(Object.values(s)), brick: o, children: o.props.$children?.map(
    (r, e) => m ? /* @__PURE__ */ t.jsx(
      n,
      {
        brick: r,
        index: e,
        iterationIndex: i,
        isDynamicPreview: p
      },
      r.id
    ) : /* @__PURE__ */ t.jsx(f, { brick: r }, r.id)
  ) });
}
export {
  O as default
};
//# sourceMappingURL=box.js.map
