"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_audio_exports = {};
__export(plugin_audio_exports, {
  AudioData: () => AudioData
});
module.exports = __toCommonJS(plugin_audio_exports);
var import_common = require("./common.js");
const baseAudioData = {};
const AudioData = {
  fromJSON(object) {
    const message = { ...baseAudioData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? import_common.PluginContainerData.fromJSON(object.containerData) : void 0;
    message.audio = object.audio !== void 0 && object.audio !== null ? import_common.Media.fromJSON(object.audio) : void 0;
    message.disableDownload = object.disableDownload !== void 0 && object.disableDownload !== null ? Boolean(object.disableDownload) : void 0;
    message.coverImage = object.coverImage !== void 0 && object.coverImage !== null ? import_common.Media.fromJSON(object.coverImage) : void 0;
    message.name = object.name !== void 0 && object.name !== null ? String(object.name) : void 0;
    message.authorName = object.authorName !== void 0 && object.authorName !== null ? String(object.authorName) : void 0;
    message.html = object.html !== void 0 && object.html !== null ? String(object.html) : 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.audio !== void 0 && (obj.audio = message.audio ? import_common.Media.toJSON(message.audio) : void 0);
    message.disableDownload !== void 0 && (obj.disableDownload = message.disableDownload);
    message.coverImage !== void 0 && (obj.coverImage = message.coverImage ? import_common.Media.toJSON(message.coverImage) : void 0);
    message.name !== void 0 && (obj.name = message.name);
    message.authorName !== void 0 && (obj.authorName = message.authorName);
    message.html !== void 0 && (obj.html = message.html);
    return obj;
  }
};
//# sourceMappingURL=plugin_audio.js.map
