/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index3.css');require('./index2.css');require('./index.css');const e=require("vue"),r=require("@gsc-basic/utils"),o=require("./videoBackground.js"),t=require("../../hooks/useNamespace.js");/* empty css             *//* empty css             */;/* empty css            */const l=require("../../_virtual/_plugin-vue_export-helper.js"),n=require("../../node_modules/lodash-es/isNil.js"),s=require("../../node_modules/lodash-es/isString.js"),i=e.defineComponent({name:"GscVideoBackground",props:{source:{type:[String,Array],required:!0},cover:{type:String,default:""},videoRemoval:{type:Boolean,default:!1},videoZIndex:{type:Number,default:-1},fullscreen:{type:Boolean,default:!0}},setup(l){const{prefixCls:i}=t.useNamespace("video-bg"),a=`${i}-ready`,u=e.ref(null);function d(o){n.default(e.unref(u))||(s.default(o)&&""!==o&&e.unref(u).setAttribute("src",l.source),r.isIterableArray(o)&&e.unref(u).removeAttribute("src"))}return e.onMounted(()=>{d(l.source),e.nextTick(()=>{new o.default(e.unref(u),{helperClass:a,videoRemoval:l.videoRemoval})})}),e.watch(()=>l.source,e=>{d(e)}),{prefixCls:i,isIterableArray:r.isIterableArray,videoRef:u,containerStyle:e.computed(()=>{const e={zIndex:l.videoZIndex};return l.fullscreen?{...e,position:"fixed",minWidth:"100vw",minHeight:"100vh"}:{...e,position:"absolute",minWidth:"100%",minHeight:"100%"}})}}}),a=["src","type"];const u=l.default(i,[["render",function(r,o,t,l,n,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([r.prefixCls]),style:e.normalizeStyle(r.containerStyle)},[r.cover?(e.openBlock(),e.createElementBlock("div",{key:0,class:"bg-cover",style:e.normalizeStyle({backgroundImage:`url(${r.cover})`,zIndex:r.videoZIndex+1})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("video",{ref:"videoRef",class:e.normalizeClass(`${r.prefixCls}-video`),preload:"metadata",loop:"",autoplay:"",muted:""},[e.renderSlot(r.$slots,"default",{},()=>[r.isIterableArray(r.source)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.source,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[""!==r.type?(e.openBlock(),e.createElementBlock("source",{key:r.type,src:r.src,type:`video/${r.type}`},null,8,a)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],!0)],2)],6)}],["__scopeId","data-v-e8a07a6a"]]);exports.default=u;