// packages/block-library/src/media-text/index.js
import { __ } from "@wordpress/i18n";
import { mediaAndText as icon } from "@wordpress/icons";
import initBlock from "../utils/init-block";
import deprecated from "./deprecated";
import edit from "./edit";
import metadata from "./block.json";
import save from "./save";
import transforms from "./transforms";
var { name } = metadata;
var settings = {
  icon,
  example: {
    viewportWidth: 601,
    // Columns collapse "@media (max-width: 600px)".
    attributes: {
      mediaType: "image",
      mediaUrl: "https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"
    },
    innerBlocks: [
      {
        name: "core/paragraph",
        attributes: {
          content: __(
            "The wren<br>Earns his living<br>Noiselessly."
          )
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: __("\u2014 Kobayashi Issa (\u4E00\u8336)")
        }
      }
    ]
  },
  transforms,
  edit,
  save,
  deprecated
};
if (window.__experimentalContentOnlyPatternInsertion) {
  settings.fields = [
    {
      label: __("Media"),
      type: "Media",
      shownByDefault: true,
      mapping: {
        id: "mediaId",
        type: "mediaType",
        src: "mediaUrl"
      },
      args: {
        allowedTypes: ["image", "video"],
        multiple: false
      }
    },
    {
      label: __("Link"),
      type: "Link",
      shownByDefault: false,
      mapping: {
        href: "href",
        rel: "rel",
        target: "linkTarget"
      }
    }
  ];
}
var init = () => initBlock({ name, metadata, settings });
export {
  init,
  metadata,
  name,
  settings
};
//# sourceMappingURL=index.js.map
