import { PluginContainerData, Media } from "./common.js";
const baseAudioData = {};
const AudioData = {
  fromJSON(object) {
    const message = { ...baseAudioData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? PluginContainerData.fromJSON(object.containerData) : void 0;
    message.audio = object.audio !== void 0 && object.audio !== null ? 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 ? 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 ? PluginContainerData.toJSON(message.containerData) : void 0);
    message.audio !== void 0 && (obj.audio = message.audio ? Media.toJSON(message.audio) : void 0);
    message.disableDownload !== void 0 && (obj.disableDownload = message.disableDownload);
    message.coverImage !== void 0 && (obj.coverImage = message.coverImage ? 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;
  }
};
export {
  AudioData
};
//# sourceMappingURL=plugin_audio.js.map
