import VideoPlayer from "./player.js";
import { n as normalizeComponent } from "./index.js";
import "./index18.js";
import "./dom.js";
import "./v4.js";
import "vue";
var render = function() {
  var _vm = this;
  var _h = _vm.$createElement;
  var _c = _vm._self._c || _h;
  return _c("div", {
    staticClass: "batch-video-preview"
  }, [_c("video-player", {
    ref: "player",
    class: {
      fit: _vm.videoUrls.length > 1
    },
    attrs: {
      "watermarkUrl": _vm.watermarkUrl,
      "videoUrl": _vm.currentVideo
    }
  }), _vm.videoUrls.length > 1 ? _c("div", {
    staticClass: "batch-video-preview__pagination"
  }, [_c("span", {
    staticClass: "arrow arrow-left",
    on: {
      "click": function($event) {
        return _vm.toggleVideo(-1);
      }
    }
  }), _c("span", {
    staticClass: "current"
  }, [_vm._v(_vm._s(_vm.currentIndex + 1) + "/" + _vm._s(_vm.videoUrls.length))]), _c("span", {
    staticClass: "arrow arrow-right",
    on: {
      "click": function($event) {
        return _vm.toggleVideo(1);
      }
    }
  })]) : _vm._e()], 1);
};
var staticRenderFns = [];
var index_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => '.batch-video-preview{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;box-sizing:border-box}.batch-video-preview .preview-wrapper.fit{height:calc(100% - 64px)!important}.batch-video-preview__pagination{display:flex;justify-content:space-between;align-items:center;width:128px;height:40px;padding:0 12px;margin-top:24px;border-radius:100px;color:#9da3ac;font-size:12px;background-color:#fff;box-shadow:0 0 2px #00000014,0 4px 16px #00000014,0 8px 32px #0000000a}.batch-video-preview__pagination .arrow{width:16px;height:16px;background-repeat:no-repeat;background-image:svg-load("./assets/arrow.svg",fill=#9DA3AC);cursor:pointer;transition:all .2s}.batch-video-preview__pagination .arrow:hover{background-image:svg-load("./assets/arrow.svg",fill=#33383E)}.batch-video-preview__pagination .arrow-left{transform:rotate(180deg)}body{min-width:1200px;overflow:overlay;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0)}body::-webkit-scrollbar{width:7px}body::-webkit-scrollbar-thumb{background-color:#000000b3;border:1px solid #fff;border-radius:10rem}body::-webkit-scrollbar-track-piece:start,body::-webkit-scrollbar-track-piece:end{background:transparent}ul{padding:0;list-style:none}.tofh{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[id^=HUABAN],[class^=HUABAN],[id^=ZCOOL],[class^=ZCOOL],[id^=lvye],[class^=lvye],[id^=xmt-],[class^=xmt-]{display:none!important}body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/grid.html"],body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/search.html"]{visibility:hidden!important;transform:translate(-10000px)!important}.eui-popup-base{z-index:2100!important}.eui-tabs__header{border-bottom-width:1px!important}.gda-btn:not(.gda-btn-sm){min-width:88px}.gda-btn>.gdaicon{font-size:20px;vertical-align:-.1em}.gda-btn svg{vertical-align:bottom}.gda-btn.disabled,.gda-btn[disabled]{cursor:default}.gda-dropdown-menu{box-shadow:0 2px 8px #00000029}.gda-dropdown-menu-item{padding:10px 12px;line-height:20px}.gda-dropdown-menu-item>.gdaicon:first-child{font-size:20px;vertical-align:bottom}.gda-dropdown-menu-item:hover,.gda-dropdown-menu-submenu-title:hover{background:#f6f7f9}.gda-dropdown-menu-item-disabled:hover,.gda-dropdown-menu-submenu-title-disabled:hover{background-color:#fff}.gda-modal-header{padding:18px 24px;border-bottom:none}.gda-modal-title{line-height:24px}.gda-modal-close-x{width:60px;height:60px;line-height:60px}.gda-modal-footer{border-top:none}.gda-form-item-label{font-weight:700}.gda-form-horizontal .gda-form-item{margin-bottom:10px}.gda-form-horizontal .gda-form-item-label{font-weight:700;line-height:48px}.gda-pagination-item,.gda-pagination-item:focus,.gda-pagination-item:hover,.gda-pagination-prev .gda-pagination-item-link,.gda-pagination-next .gda-pagination-item-link{color:#444950;background-color:#f0f3f4;border:none}.gda-pagination-item-active,.gda-pagination-item-active:focus,.gda-pagination-item-active:hover{background:#2254f4;border:none}.gda-pagination-item-active a,.gda-pagination-item-active:focus a,.gda-pagination-item-active:hover a{color:#fff}.gda-pagination-prev.gda-pagination-disabled .gda-pagination-item-link,.gda-pagination-next.gda-pagination-disabled .gda-pagination-item-link{opacity:.3}.gda-pagination-prev:focus .gda-pagination-item-link,.gda-pagination-next:focus .gda-pagination-item-link,.gda-pagination-prev:hover .gda-pagination-item-link,.gda-pagination-next:hover .gda-pagination-item-link{color:#444950}.gda-tree li,.gda-tree li:first-child,.gda-tree li:last-child{padding:0}.gda-tree-child-tree>li:first-child{padding-top:0}:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_close .gda-tree-switcher-icon,:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_open .gda-tree-switcher-icon{font-size:16px;vertical-align:-3px}.gda-tree.gda-tree-directory>li span.gda-tree-node-content-wrapper:hover:before,.gda-tree.gda-tree-directory .gda-tree-child-tree>li span.gda-tree-node-content-wrapper:hover:before{border-radius:4px}.gda-tree .gda-tree-treenode-checkbox-checked .gda-tree-checkbox-checked:after{display:none}\n')();
const __vue2_script = {
  name: "batch-video-preview",
  components: {
    VideoPlayer
  },
  props: {
    videoUrls: {
      type: Array,
      default: () => []
    },
    watermarkUrl: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      currentIndex: 0,
      currentVideo: ""
    };
  },
  mounted() {
    this.currentVideo = this.videoUrls[this.currentIndex];
  },
  methods: {
    toggleVideo(index2) {
      const player = this.$refs.player;
      if (player) {
        player.pauseVideo();
      }
      const total = this.videoUrls.length;
      this.currentIndex = (this.currentIndex + index2 + total) % total;
      this.currentVideo = this.videoUrls[this.currentIndex];
    }
  }
};
const __cssModules = {};
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
function __vue2_injectStyles(context) {
  for (let o in __cssModules) {
    this[o] = __cssModules[o];
  }
}
var index = /* @__PURE__ */ function() {
  return __component__.exports;
}();
export { index as default };
