import { Node_Type, SmartBlockData_ColumnSize, SmartBlockData_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
const smartBlock = (...args) => {
  const smartBlockData = args.find((a) => !("type" in a));
  const nodeBuilders = args.filter((a) => "type" in a && a.type === "block_node");
  return {
    type: "block_node",
    // @ts-expect-error — nodes is optional here; matches layout.builder pattern
    node: (getId) => ({
      id: getId(),
      type: Node_Type.SMART_BLOCK,
      ...nodeBuilders.length && {
        nodes: nodeBuilders.map((nb) => nb.node(getId))
      },
      smartBlockData: {
        type: SmartBlockData_Type.SOLID_BOXES,
        columnSize: SmartBlockData_ColumnSize.MEDIUM,
        ...smartBlockData
      }
    })
  };
};
const smartBlockCell = (...args) => {
  return {
    type: "block_node",
    node: (getId) => ({
      id: getId(),
      type: Node_Type.SMART_BLOCK_CELL,
      nodes: args.map((nb) => nb.node(getId))
    })
  };
};
export {
  smartBlock,
  smartBlockCell
};
//# sourceMappingURL=smart-block.builder.js.map
