import { Node_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { isDefined } from "./utils.js";
const image = (...args) => {
  const imageData = args.find((a) => !("type" in a));
  return {
    type: "block_node",
    // @ts-ignore
    node: (getId) => {
      const nodes = args.map((arg) => "type" in arg && arg.type === "block_node" ? arg.node(getId) : void 0).filter(isDefined);
      return {
        id: getId(),
        type: Node_Type.IMAGE,
        imageData: imageData ? imageData : {},
        ...nodes?.length && { nodes }
      };
    }
  };
};
export {
  image
};
//# sourceMappingURL=image.builder.js.map
