/*!
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("../../_virtual/_rollupPluginBabelHelpers.js"),s=require("../../events.js"),t=require("../../plugin/plugin.js"),i=require("../common/iconTools.js"),n=require("../common/iconPlugin.js"),l=require("../assets/requestCssFull.js"),r=require("../assets/exitCssFull.js");var c=function(n){e.inherits(a,n);var c=e.createSuper(a);function a(){return e.classCallCheck(this,a),c.apply(this,arguments)}return e.createClass(a,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.cssFullscreen&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var t=this;e.get(e.getPrototypeOf(a.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(s.CSS_FULLSCREEN_CHANGE,function(e){t.animate(e)}),this.btnClick=this.btnClick.bind(this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,s=this.find(".xgplayer-icon");s.appendChild(e.cssFullscreen),s.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var s=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:s}),s?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var s=this.i18nKeys,t=this.find(".xg-tips");t&&this.changeLangTextKey(t,e?s.EXITCSSFULLSCREEN_TIPS:s.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:l.default,class:"xg-get-cssfull"},exitCssFullscreen:{icon:r.default,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){e.get(e.getPrototypeOf(a.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n    <div class=\"xgplayer-icon\">\n    </div>\n    ".concat(i.xgIconTips(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n    </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:t.POSITIONS.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),a}(n.default);exports.default=c;