"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);
var plugin_embed_exports = {};
__export(plugin_embed_exports, {
  EmbedData: () => EmbedData
});
module.exports = __toCommonJS(plugin_embed_exports);
var import_common = require("./common.js");
const baseEmbedData = {};
const EmbedData = {
  fromJSON(object) {
    const message = { ...baseEmbedData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? import_common.PluginContainerData.fromJSON(object.containerData) : void 0;
    message.oembed = object.oembed !== void 0 && object.oembed !== null ? import_common.Oembed.fromJSON(object.oembed) : void 0;
    message.src = object.src !== void 0 && object.src !== null ? String(object.src) : void 0;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.containerData !== void 0 && (obj.containerData = message.containerData ? import_common.PluginContainerData.toJSON(message.containerData) : void 0);
    message.oembed !== void 0 && (obj.oembed = message.oembed ? import_common.Oembed.toJSON(message.oembed) : void 0);
    message.src !== void 0 && (obj.src = message.src);
    return obj;
  }
};
//# sourceMappingURL=plugin_embed.js.map
