// packages/block-library/src/file/index.js
import { _x, __ } from "@wordpress/i18n";
import { file 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: {
    attributes: {
      href: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",
      fileName: _x("Armstrong_Small_Step", "Name of the file")
    }
  },
  transforms,
  deprecated,
  edit,
  save
};
if (window.__experimentalContentOnlyPatternInsertion) {
  settings.fields = [
    {
      label: __("File"),
      type: "Media",
      shownByDefault: true,
      mapping: {
        id: "id",
        src: "href"
      },
      args: {
        allowedTypes: [],
        multiple: false
      }
    },
    {
      label: __("Filename"),
      type: "RichText",
      shownByDefault: false,
      mapping: {
        value: "fileName"
      }
    },
    {
      label: __("Button Text"),
      type: "RichText",
      shownByDefault: false,
      mapping: {
        value: "downloadButtonText"
      }
    }
  ];
}
var init = () => initBlock({ name, metadata, settings });
export {
  init,
  metadata,
  name,
  settings
};
//# sourceMappingURL=index.js.map
