import { PluginContainerData, Oembed } from "./common.js";
const baseEmbedData = {};
const EmbedData = {
  fromJSON(object) {
    const message = { ...baseEmbedData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? PluginContainerData.fromJSON(object.containerData) : void 0;
    message.oembed = object.oembed !== void 0 && object.oembed !== null ? 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 ? PluginContainerData.toJSON(message.containerData) : void 0);
    message.oembed !== void 0 && (obj.oembed = message.oembed ? Oembed.toJSON(message.oembed) : void 0);
    message.src !== void 0 && (obj.src = message.src);
    return obj;
  }
};
export {
  EmbedData
};
//# sourceMappingURL=plugin_embed.js.map
