// packages/block-library/src/button/index.js
import { __ } from "@wordpress/i18n";
import { button 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";
var { name } = metadata;
var settings = {
  icon,
  example: {
    attributes: {
      className: "is-style-fill",
      text: __("Call to action")
    }
  },
  edit,
  save,
  deprecated,
  merge: (a, { text = "" }) => ({
    ...a,
    text: (a.text || "") + text
  })
};
if (window.__experimentalContentOnlyPatternInsertion) {
  settings.fields = [
    {
      label: __("Content"),
      type: "RichText",
      shownByDefault: true,
      mapping: {
        value: "text"
      }
    },
    {
      label: __("Link"),
      type: "Link",
      shownByDefault: false,
      mapping: {
        href: "url",
        rel: "rel",
        target: "linkTarget"
      }
    }
  ];
}
var init = () => initBlock({ name, metadata, settings });
export {
  init,
  metadata,
  name,
  settings
};
//# sourceMappingURL=index.js.map
