"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_video_exports = {};
__export(plugin_video_exports, {
  VideoData: () => VideoData
});
module.exports = __toCommonJS(plugin_video_exports);
var import_common = require("./common.js");
const baseVideoData = {};
const VideoData = {
  fromJSON(object) {
    const message = { ...baseVideoData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? import_common.PluginContainerData.fromJSON(object.containerData) : void 0;
    message.video = object.video !== void 0 && object.video !== null ? import_common.Media.fromJSON(object.video) : void 0;
    message.thumbnail = object.thumbnail !== void 0 && object.thumbnail !== null ? import_common.Media.fromJSON(object.thumbnail) : void 0;
    message.disableDownload = object.disableDownload !== void 0 && object.disableDownload !== null ? Boolean(object.disableDownload) : void 0;
    message.title = object.title !== void 0 && object.title !== null ? String(object.title) : void 0;
    message.options = object.options !== void 0 && object.options !== null ? import_common.PlaybackOptions.fromJSON(object.options) : 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.video !== void 0 && (obj.video = message.video ? import_common.Media.toJSON(message.video) : void 0);
    message.thumbnail !== void 0 && (obj.thumbnail = message.thumbnail ? import_common.Media.toJSON(message.thumbnail) : void 0);
    message.disableDownload !== void 0 && (obj.disableDownload = message.disableDownload);
    message.title !== void 0 && (obj.title = message.title);
    message.options !== void 0 && (obj.options = message.options ? import_common.PlaybackOptions.toJSON(message.options) : void 0);
    return obj;
  }
};
//# sourceMappingURL=plugin_video.js.map
