/*!
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"}});const e=require("@gsc-basic/hooks"),t=require("./helper.js");exports.default=class{constructor(e,s={}){this.options=Object.assign({helperClass:"",videoRemoval:!1},s),this._name=this.constructor.name,this.element=t.validateSelector(e,this._name),this.init()}init(){this.element.readyState>=this.element.HAVE_FUTURE_DATA?this.handler():this.element.addEventListener("canplay",()=>{this.handler()}),e.useWindowSizeFn(()=>{this.handler()},100,{immediate:!1})}handler(){const e=document.body;t.detectTouchOrSmallScreen()?(this.element.pause(),this.options.videoRemoval&&t.removeVideo(this.element),e.classList.remove(this.options.helperClass)):(this.options.videoRemoval&&t.restoreVideo(this.element),this.element.play(),e.classList.add(this.options.helperClass))}};