import { jsx } from "react/jsx-runtime";
import { u as useDroppable, C as CollisionPriority, H as directionBiased } from "./index.C8AMu7HL.js";
import { a as tx } from "./twind.DdSZmZu6.js";
function BrickRoot({
  as,
  children,
  manifest,
  className,
  editable,
  brick,
  ...props
}) {
  const droppable = useDroppable({
    id: brick.id,
    data: { brick, manifest },
    disabled: !editable || !manifest.isContainer,
    type: "brick",
    accept: (source) => source.type === "brick" || source.type === "library",
    collisionDetector: directionBiased,
    collisionPriority: CollisionPriority.High
  });
  const Component = as || "div";
  return /* @__PURE__ */ jsx(
    Component,
    {
      ...props,
      ref: droppable.ref,
      className: tx(
        !manifest.isContainer && "min-h-fit min-w-fit",
        "flex flex-1 rounded-[inherit] w-fill h-fill flex-wrap",
        className
      ),
      children
    }
  );
}
export {
  BrickRoot as B
};
//# sourceMappingURL=BrickRoot.D_a_fRJm.js.map
