import { j as c } from "../../../../../_virtual/jsx-runtime.js";
import { Suspense as p, lazy as n } from "react";
import { useSelectedBrickId as x } from "../../../../../use-editor.js";
const b = /* @__PURE__ */ Object.assign({ "../bricks/accordion.tsx": () => import("../bricks/accordion.js"), "../bricks/box.tsx": () => import("../bricks/box.js"), "../bricks/button.tsx": () => import("../bricks/button.js"), "../bricks/card.tsx": () => import("../bricks/card.js"), "../bricks/carousel.tsx": () => import("../bricks/carousel.js"), "../bricks/footer.tsx": () => import("../bricks/footer.js"), "../bricks/form.tsx": () => import("../bricks/form.js"), "../bricks/hero.tsx": () => import("../bricks/hero.js"), "../bricks/html.tsx": () => import("../bricks/html.js"), "../bricks/icon.tsx": () => import("../bricks/icon.js"), "../bricks/image.tsx": () => import("../bricks/image.js"), "../bricks/images-gallery.tsx": () => import("../bricks/images-gallery.js"), "../bricks/map.tsx": () => import("../bricks/map.js"), "../bricks/navbar.tsx": () => import("../bricks/navbar.js"), "../bricks/sidebar.tsx": () => import("../bricks/sidebar.js"), "../bricks/social-links.tsx": () => import("../bricks/social-links.js"), "../bricks/spacer.tsx": () => import("../bricks/spacer.js"), "../bricks/testimonials.tsx": () => import("../bricks/testimonials.js"), "../bricks/text.tsx": () => import("../bricks/text.js"), "../bricks/video.tsx": () => import("../bricks/video.js") }), k = Object.entries(b).reduce(
  (t, [r, s]) => {
    const i = r.match(/\.\/bricks\/(.*)\.(j|t)sx?$/)[1];
    return t[i] = n(s), t;
  },
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
  {}
), u = ({
  brick: t,
  editable: r,
  isDynamicPreview: s,
  iterationIndex: i
}) => {
  const e = x(), o = k[t.type];
  if (!o)
    return console.warn("Brick not found", t.type), null;
  const m = {
    brick: t,
    editable: r,
    isDynamicPreview: s,
    selected: t.id === e,
    iterationIndex: i
  };
  return /* @__PURE__ */ c.jsx(p, { children: /* @__PURE__ */ c.jsx(o, { ...m }) });
};
export {
  u as default
};
//# sourceMappingURL=BrickComponent.js.map
