// packages/block-library/src/group/transforms.js
import { createBlock } from "@wordpress/blocks";
var transforms = {
  from: [
    {
      type: "block",
      isMultiBlock: true,
      blocks: ["*"],
      __experimentalConvert(blocks) {
        const alignments = ["wide", "full"];
        const widestAlignment = blocks.reduce(
          (accumulator, block) => {
            const { align } = block.attributes;
            return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
          },
          void 0
        );
        const groupInnerBlocks = blocks.map((block) => {
          return createBlock(
            block.name,
            block.attributes,
            block.innerBlocks
          );
        });
        return createBlock(
          "core/group",
          {
            align: widestAlignment,
            layout: { type: "constrained" }
          },
          groupInnerBlocks
        );
      }
    }
  ]
};
var transforms_default = transforms;
export {
  transforms_default as default
};
//# sourceMappingURL=transforms.js.map
