"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// packages/block-library/src/template-part/edit/utils/map-template-part-to-block-pattern.js
var map_template_part_to_block_pattern_exports = {};
__export(map_template_part_to_block_pattern_exports, {
  mapTemplatePartToBlockPattern: () => mapTemplatePartToBlockPattern
});
module.exports = __toCommonJS(map_template_part_to_block_pattern_exports);
var import_blocks = require("@wordpress/blocks");
var import_create_template_part_id = require("./create-template-part-id");
function mapTemplatePartToBlockPattern(templatePart) {
  return {
    name: (0, import_create_template_part_id.createTemplatePartId)(templatePart.theme, templatePart.slug),
    title: templatePart.title.rendered,
    blocks: (0, import_blocks.parse)(templatePart.content.raw),
    templatePart
  };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  mapTemplatePartToBlockPattern
});
//# sourceMappingURL=map-template-part-to-block-pattern.js.map
